mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[MSAFD]
- Only shutdown the socket if it has not already been shutdown - Fixes EINVAL messages svn path=/trunk/; revision=52518
This commit is contained in:
parent
3657f4ff79
commit
df556f104f
1 changed files with 21 additions and 17 deletions
|
@ -515,6 +515,9 @@ WSPCloseSocket(IN SOCKET Handle,
|
|||
DisconnectInfo.Timeout = RtlConvertLongToLargeInteger(0);
|
||||
DisconnectInfo.DisconnectType = LingerWait < 0 ? AFD_DISCONNECT_SEND : AFD_DISCONNECT_ABORT;
|
||||
|
||||
if (((DisconnectInfo.DisconnectType & AFD_DISCONNECT_SEND) && (!Socket->SharedData.SendShutdown)) ||
|
||||
((DisconnectInfo.DisconnectType & AFD_DISCONNECT_ABORT) && (!Socket->SharedData.ReceiveShutdown)))
|
||||
{
|
||||
/* Send IOCTL */
|
||||
Status = NtDeviceIoControlFile((HANDLE)Handle,
|
||||
SockEvent,
|
||||
|
@ -535,6 +538,7 @@ WSPCloseSocket(IN SOCKET Handle,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Cleanup Time! */
|
||||
Socket->HelperContext = NULL;
|
||||
|
|
Loading…
Reference in a new issue