Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
5867:26d28506282a | 5868:6bbad2e73245 |
---|---|
376 wev->ready = 0; | 376 wev->ready = 0; |
377 return in; | 377 return in; |
378 } | 378 } |
379 | 379 |
380 if (eintr) { | 380 if (eintr) { |
381 send = prev_send + sent; | |
381 continue; | 382 continue; |
382 } | 383 } |
383 | 384 |
384 if (send - prev_send != sent) { | 385 if (send - prev_send != sent) { |
385 wev->ready = 0; | 386 wev->ready = 0; |