virtio-win / kvm-guest-drivers-windows

Windows paravirtualized drivers for QEMU\KVM
https://www.linux-kvm.org/page/WindowsGuestDrivers
BSD 3-Clause "New" or "Revised" License
1.92k stars 377 forks source link

Viosock: Take Care of Recv Requests Stucks After Socket Shutdown #1036

Closed MartinDrab closed 5 months ago

MartinDrab commented 5 months ago

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

YanVugenfirer commented 5 months ago

@MartinDrab Thanks! Waiting for CI to run before merging