From: Felix Fietkau Date: Tue, 30 Jul 2013 22:32:40 +0000 (+0200) Subject: proc: consume all data after the pipe dies, instead of looping with 100% cpu usage X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7823ad9590d0ec54bca6f637e0d8b14794bb49c0;p=oweals%2Fuhttpd.git proc: consume all data after the pipe dies, instead of looping with 100% cpu usage Signed-off-by: Felix Fietkau --- diff --git a/proc.c b/proc.c index 67356dd..5be6232 100644 --- a/proc.c +++ b/proc.c @@ -282,9 +282,8 @@ static int proc_data_send(struct client *cl, const char *data, int len) if (errno == EAGAIN || errno == EWOULDBLOCK) break; - /* error, no retry */ - len = 0; - break; + /* consume all data */ + ret = len; } if (!ret)