From c0776e6217fb3a0a04dc52b5a65b67c91c35c695 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 18 Dec 2011 19:04:15 +0100 Subject: OPTIM: don't try to send() after incomplete splice() --- httpterm.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/httpterm.c b/httpterm.c index 3a651f9..89bb25d 100644 --- a/httpterm.c +++ b/httpterm.c @@ -1646,6 +1646,10 @@ int event_cli_write(int fd) { slave_pipe_usage -= ret; max = 0; } + else if (ret < 0 && errno == EAGAIN) { + /* Output buffer is full, ensure we don't try again with send() */ + max = 0; + } } } #endif -- 1.7.2.3