mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Better handling of stream events while in a TLS handshake
This commit is contained in:
parent
cc50c639ae
commit
d704846c6f
4 changed files with 42 additions and 41 deletions
|
@ -1584,26 +1584,7 @@ setNonBlocking(SOCKET fd)
|
|||
*/
|
||||
if (_handler != nil && [_handler handshake] == YES)
|
||||
{
|
||||
id hdl = _handler;
|
||||
id del = _delegate;
|
||||
BOOL val = _delegateValid;
|
||||
|
||||
/* Retain self to prevent a dangling pointer the handler closes and
|
||||
* releases this socket. Also, do not restore the old delegate if it
|
||||
* was changed directly or indirectly by the handler.
|
||||
* FIXME We leave the socket an inconsistent state if any exception
|
||||
* is raised in _sendEvent:.
|
||||
*/
|
||||
RETAIN(self);
|
||||
_delegate = hdl;
|
||||
_delegateValid = YES;
|
||||
[super _sendEvent: event];
|
||||
if (_delegate == hdl)
|
||||
{
|
||||
_delegate = del;
|
||||
_delegateValid = val;
|
||||
}
|
||||
RELEASE(self);
|
||||
[super _sendEvent: event delegate: _handler];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue