Permalink
Browse files

check for EWOULDBLOCK

  • Loading branch information...
Roberto De Ioris
Roberto De Ioris committed Jul 21, 2012
1 parent 89aeccb commit 6ed3e66fefbe16b7c31c1e3c1c0a1aa456a2fb9f
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/writequeue.c
View
@@ -65,7 +65,7 @@ void bb_wq_callback(struct ev_loop *loop, struct ev_io *w, int revents) {
if (bbwi->len == 0) goto next;
ssize_t wlen = write(bbs->fd, bbwi->buf+bbwi->pos, bbwi->len-bbwi->pos);
if (wlen < 0) {
- if (errno == EAGAIN) {
+ if (errno == EAGAIN || errno == EWOULDBLOCK) {
return ;
}
bb_error("unable to write to client: write()");

0 comments on commit 6ed3e66

Please sign in to comment.