Prevent too early release

This commit is contained in:
Wolfgang Lux 2019-10-29 11:58:18 +01:00
parent d704846c6f
commit 13f7446a32

View file

@ -1584,7 +1584,12 @@ setNonBlocking(SOCKET fd)
*/
if (_handler != nil && [_handler handshake] == YES)
{
/* Must retain self here to avoid premature deallocation of input
* and/or output stream in case of an error during TLS handshake.
*/
RETAIN(self);
[super _sendEvent: event delegate: _handler];
RELEASE(self);
}
else
{