When an other end (peer) of the socket reports a shutdown, the recv request queue is not processed. This means that some recv calls may get stuck forever. This pull request changes the behavior -- when a shutdown from its peer is received, the recv queue gets processed and all requests that would get stuck are completed with STATUS_SUCCESS (which usually ends in receiving zero bytes).
This should fix #1020. I tested with
client in WIndows VM, server on the host,
both client and server within the same Windows VM.
When an other end (peer) of the socket reports a shutdown, the
recv
request queue is not processed. This means that some recv calls may get stuck forever. This pull request changes the behavior -- when a shutdown from its peer is received, the recv queue gets processed and all requests that would get stuck are completed withSTATUS_SUCCESS
(which usually ends in receiving zero bytes).This should fix #1020. I tested with