Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We poll after each failed select to make sure we're not supposed to wake up and die or propagate an exception. If we are supposed to block, we should keep blocking here until interrupted or the stream has data. If we proceed from here to a blocking read when data is unavailable, we may end up inside NIO code that closes the stream upon any interrupt. Selects are interrupt, so we work harder to stay in select logic when doing a blocking read that might be interrupted.
- Loading branch information