stream-tcp: EAGAIN is not an error

This fixes inadvertent treatment of a normal situation as an error.
websockets
Andri Yngvason 2023-04-10 11:36:56 +00:00
parent 5530b22fde
commit afc0256b2f
1 changed files with 1 additions and 0 deletions

View File

@ -94,6 +94,7 @@ static int stream_tcp__flush(struct stream* self)
if (errno == EAGAIN || errno == EWOULDBLOCK) {
stream__poll_rw(self);
errno = EAGAIN;
bytes_sent = 0;
} else if (errno == EPIPE) {
stream__remote_closed(self);
errno = EPIPE;