Mercurial > hg > nginx
comparison src/os/unix/ngx_linux_sendfile_chain.c @ 6431:3b9c6b91d988
Fixed handling of EAGAIN with sendfile in threads.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 14 Mar 2016 22:42:35 +0300 |
parents | 768e287a6f36 |
children | 4df3d9fcdee8 |
comparison
equal
deleted
inserted
replaced
6430:33aef5cd3d43 | 6431:3b9c6b91d988 |
---|---|
341 wev = c->write; | 341 wev = c->write; |
342 | 342 |
343 if (task->event.complete) { | 343 if (task->event.complete) { |
344 task->event.complete = 0; | 344 task->event.complete = 0; |
345 | 345 |
346 if (ctx->err && ctx->err != NGX_EAGAIN) { | 346 if (ctx->err == NGX_EAGAIN) { |
347 *sent = 0; | |
348 return NGX_AGAIN; | |
349 } | |
350 | |
351 if (ctx->err) { | |
347 wev->error = 1; | 352 wev->error = 1; |
348 ngx_connection_error(c, ctx->err, "sendfile() failed"); | 353 ngx_connection_error(c, ctx->err, "sendfile() failed"); |
349 return NGX_ERROR; | 354 return NGX_ERROR; |
350 } | 355 } |
351 | 356 |