diff src/os/unix/ngx_freebsd_sendfile_chain.c @ 5868:6bbad2e73245

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.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 27 Aug 2014 20:51:01 +0400
parents b63e829621ab
children de68ed551bfb
line wrap: on
line diff
--- 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_connectio
         }
 
         if (eintr) {
+            send = prev_send + sent;
             continue;
         }