forked from brightroll/rq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle long reads and use IO#readpartial
The complete read might not show up in the first read() call, so continue looping until the target length is reached. Use IO#readpartial instead of looping with IO#sysread; the difference is that readpartial loops on EAGAIN and EINTR, but it uses select() to wait for a readable handle instead of doing a busy retry.
- Loading branch information
Showing
2 changed files
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters