Impossible to break SSL request w/o AV - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Indy (https://www.atozed.com/forums/forum-8.html) +--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html) +--- Thread: Impossible to break SSL request w/o AV (/thread-1389.html) |
Impossible to break SSL request w/o AV - evgenyk - 11-19-2019 Hi, How to correctly break SSL request that is launched in background thread ? nowadays I have situation when TIdSSLSocket is destroyed after calling Disconnect: Quote:IdSSLOpenSSL.TIdSSLSocket.Destroybut TIdSSLSocket.Send is still executed and I have AV because fSSL is nil: Code: function TIdSSLSocket.Send(const ABuffer: TIdBytes; AOffset, ALength: Integer): Integer; Quote:IdSSLOpenSSL.TIdSSLSocket.Send(...) as a workaround, I can suggest to add checking like if fSSL = nil then Break; in the beginning of loop RE: Impossible to break SSL request w/o AV - rlebeau - 11-22-2019 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 this ticket. In that ticket, just closing the underlying socket without destroying the SSL object worked. A similar solution would likely apply here, too. |