Don't assume a short non-blocking read() means the socket buffer is empty.
According to David Klempner, this turns out not to be a safe assumption: https://twitter.com/CaptainSegfault/status/1112622245531144194 Interestingly, it turns out this optimization was also blocking the delivery of certain errors, because we would skip the read() where that error would otherwise be delivered. (Hence the unit test update.)
Showing
Please
register
or
sign in
to comment