From 840b347bb24bea09f9824891239929cdce84e47b Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Wed, 27 Aug 2014 20:51:01 +0400 Subject: Fixed counting of sent bytes in the send chain functions on EINTR. Previously, a value of the "send" variable wasn't properly adjusted in a rare case when syscall was interrupted by a signal. As a result, these functions could send less data than the limit allows. --- src/os/unix/ngx_freebsd_sendfile_chain.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/os/unix/ngx_freebsd_sendfile_chain.c') diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c index f5d0f3a8a..88eacc2d1 100644 --- a/src/os/unix/ngx_freebsd_sendfile_chain.c +++ b/src/os/unix/ngx_freebsd_sendfile_chain.c @@ -378,6 +378,7 @@ ngx_freebsd_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) } if (eintr) { + send = prev_send + sent; continue; } -- cgit