Skip to content

Commit 6249878

Browse files
authored
Merge pull request #166 from chsu-ibm/handle-ewouldblock-error
handle EWOULDBLOCK error in _dispatch_operation_perform
2 parents 7fe8323 + 670ae8b commit 6249878

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,10 +2288,10 @@ _dispatch_operation_perform(dispatch_operation_t op)
22882288
return DISPATCH_OP_DELIVER;
22892289
}
22902290
error:
2291-
if (err == EAGAIN) {
2291+
if (err == EAGAIN || err == EWOULDBLOCK) {
22922292
// For disk based files with blocking I/O we should never get EAGAIN
22932293
dispatch_assert(!op->fd_entry->disk);
2294-
_dispatch_op_debug("performed: EAGAIN", op);
2294+
_dispatch_op_debug("performed: EAGAIN/EWOULDBLOCK", op);
22952295
if (op->direction == DOP_DIR_READ && op->total &&
22962296
op->channel == op->fd_entry->convenience_channel) {
22972297
// Convenience read with available data completes on EAGAIN

0 commit comments

Comments
 (0)