From afc0256b2ff85ee43d08422c378133eb7a1c1b2a Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Mon, 10 Apr 2023 11:36:56 +0000 Subject: [PATCH] stream-tcp: EAGAIN is not an error This fixes inadvertent treatment of a normal situation as an error. --- src/stream-tcp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stream-tcp.c b/src/stream-tcp.c index a25d437..9f2d2a5 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -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;