h1 servers can shutdown connections with pending buffered data on filled sockets by deven96 · Pull Request #4018 · hyperium/hyper
Target fix for #4022
The fix I am proposing is to simply propagate pending flushes within the poll loop to give the buffer a chance to get fully flushed and the included test just simply asserts that shutdown was not called with pending flushes
I did notice a previously yanked change on here that modified the poll loop to achieve something similar but this should lead to exiting the poll loop and waiting to get polled again rather than exhausting the CPU