-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to terminate Recv/Send methods if fSSL was destroyed #270
base: master
Are you sure you want to change the base?
Conversation
Checking for nil is not good enough, all it does is introduce a new race condition and doesn't address the root issue of the TIdSSLSocket object being freed while it is still actively being used. This same issue also affects TIdTCPServer, see #218. In that ticket, just closing the underlying socket without destroying the SSL object worked. A similar solution would likely apply here, too. |
it doesn't work for me.
so We can add some variable like |
If the
Yes, I'm aware of that.
That would not work. If the |
I agree that an AV creates an unnecessary security risk in the library. However, I also agree that this AV is a consequence of anyother problem in the software itself. |
There is no security risk in an AV being raised. And there is really no difference in raising one type of exception versus another. I don't think checking for a nil SSL object is the right solution in this situation. It doesn't actually solve anything. |
I'm using
TIdHTTP
/SSL
in background thread.if I call
Post
method, I have AV after callingDisconnect
in main thread becauseTIdSSLSocket
is destroyed butTIdSSLSocket.Send
is still executed ....call-stack (main thread) when TIdSSLSocket is freed:
AV in
TIdSSLSocket.Send
becausefSSL
isnil
:call-stack for this is
if we add checking for
nil
forfSSL
we can avoid AV