Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bad race condition that causes intermittent socket receive
failures. The issue is caused by the code checking socket status *after* checking if bytes are available. Bytes may have become available between the last byte available check and the socket status check. This causes us to incorrectly ignore the newly available bytes and return 0 to the caller, which in any blocking/timeout scenario tells the caller no more bytes will ever be available. This was introduced in commit 89b9f10 See also #151 as a fix for #135
- Loading branch information