Mercurial > hg > nginx
comparison src/os/unix/ngx_darwin_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 |
---|---|
306 c->sent += sent; | 306 c->sent += sent; |
307 | 307 |
308 in = ngx_handle_sent_chain(in, sent); | 308 in = ngx_handle_sent_chain(in, sent); |
309 | 309 |
310 if (eintr) { | 310 if (eintr) { |
311 send = prev_send + sent; | |
311 continue; | 312 continue; |
312 } | 313 } |
313 | 314 |
314 if (send - prev_send != sent) { | 315 if (send - prev_send != sent) { |
315 wev->ready = 0; | 316 wev->ready = 0; |