stream-tcp: EAGAIN is not an error
This fixes inadvertent treatment of a normal situation as an error.websockets
parent
5530b22fde
commit
afc0256b2f
|
@ -94,6 +94,7 @@ static int stream_tcp__flush(struct stream* self)
|
||||||
if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
||||||
stream__poll_rw(self);
|
stream__poll_rw(self);
|
||||||
errno = EAGAIN;
|
errno = EAGAIN;
|
||||||
|
bytes_sent = 0;
|
||||||
} else if (errno == EPIPE) {
|
} else if (errno == EPIPE) {
|
||||||
stream__remote_closed(self);
|
stream__remote_closed(self);
|
||||||
errno = EPIPE;
|
errno = EPIPE;
|
||||||
|
|
Loading…
Reference in New Issue