mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fixed order of operations in out port invalidation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4283 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9deccea05a
commit
dd21458fd6
1 changed files with 5 additions and 5 deletions
|
@ -2086,6 +2086,8 @@ static NSMapTable *out_port_bag = NULL;
|
|||
the socket_2_port in +newForSendingToSockaddr:... */
|
||||
NSMapRemove (socket_2_port, (void*)_port_socket);
|
||||
|
||||
[port _connectedOutPortInvalidated: self];
|
||||
|
||||
/* This also posts a NSPortDidBecomeInvalidNotification. */
|
||||
[super invalidate];
|
||||
|
||||
|
@ -2093,19 +2095,17 @@ static NSMapTable *out_port_bag = NULL;
|
|||
getting it. This may help Connection invalidation confusion. */
|
||||
if (_port_socket > 0)
|
||||
{
|
||||
#ifdef __WIN32__
|
||||
#ifdef __WIN32__
|
||||
if (closesocket (_port_socket) < 0)
|
||||
#else
|
||||
#else
|
||||
if (close (_port_socket) < 0)
|
||||
#endif /* __WIN32 */
|
||||
#endif /* __WIN32 */
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"[TcpOutPort -invalidate:] close(): %s",
|
||||
strerror(errno)];
|
||||
}
|
||||
}
|
||||
|
||||
[port _connectedOutPortInvalidated: self];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue