mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 09:42:39 +08:00
Fixed handling of EAGAIN with sendfile in threads.
This commit is contained in:
parent
2b4a62c2fc
commit
b3c1abdcd8
@ -343,7 +343,12 @@ ngx_linux_sendfile_thread(ngx_connection_t *c, ngx_buf_t *file, size_t size,
|
|||||||
if (task->event.complete) {
|
if (task->event.complete) {
|
||||||
task->event.complete = 0;
|
task->event.complete = 0;
|
||||||
|
|
||||||
if (ctx->err && ctx->err != NGX_EAGAIN) {
|
if (ctx->err == NGX_EAGAIN) {
|
||||||
|
*sent = 0;
|
||||||
|
return NGX_AGAIN;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ctx->err) {
|
||||||
wev->error = 1;
|
wev->error = 1;
|
||||||
ngx_connection_error(c, ctx->err, "sendfile() failed");
|
ngx_connection_error(c, ctx->err, "sendfile() failed");
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user