diff options
Diffstat (limited to 'src/buffio.c')
-rw-r--r-- | src/buffio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buffio.c b/src/buffio.c index 95db681..95e3dec 100644 --- a/src/buffio.c +++ b/src/buffio.c @@ -260,6 +260,10 @@ static void do_read(struct buffio *b) { //daemon_log(LOG_INFO, "%p: Read %u (%u) bytes.", b, s, m); if (s < 0) { + + if (errno == EAGAIN) + return; + daemon_log(LOG_ERR, "Failed to read from file descriptor: %s", strerror(errno)); buffio_close_input_fd(b); buffio_sched_cb(b, BUFFIO_SCHED_CB_ERROR); @@ -309,6 +313,9 @@ static void do_write(struct buffio *b) { //daemon_log(LOG_INFO, "%p: Wrote %u (%u) bytes.", b, s, m); if (s < 0) { + if (errno == EAGAIN) + return; + buffio_close_output_fd(b); if (errno == EPIPE) { |