diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-01-31 22:26:50 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-01-31 22:26:50 +0300 |
commit | 18281ee37eaa9409a6af0aeb3c1926bba36cba0f (patch) | |
tree | 02c6421f40c6fe0b0a966e3f1e355da0a9b0fe4c /src/nxt_event_conn_job_sendfile.c | |
parent | bb87fa11ca65d1263a32f86d51d1daa89dc11544 (diff) | |
download | unit-18281ee37eaa9409a6af0aeb3c1926bba36cba0f.tar.gz unit-18281ee37eaa9409a6af0aeb3c1926bba36cba0f.tar.bz2 |
Event engine timers refactoring.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_event_conn_job_sendfile.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/nxt_event_conn_job_sendfile.c b/src/nxt_event_conn_job_sendfile.c index 4a0d1a5c..a49e78dd 100644 --- a/src/nxt_event_conn_job_sendfile.c +++ b/src/nxt_event_conn_job_sendfile.c @@ -84,10 +84,6 @@ nxt_event_conn_job_sendfile_start(nxt_task_t *task, void *obj, void *data) c->blocked = 1; - if (c->write_timer.state != NXT_TIMER_DISABLED) { - c->write_timer.state = NXT_TIMER_BLOCKED; - } - nxt_job_start(task, &jbs->job, nxt_event_conn_job_sendfile_handler); return; } @@ -210,10 +206,7 @@ nxt_event_conn_job_sendfile_return(nxt_task_t *task, void *obj, void *data) } if (sent != 0 && c->write_state->autoreset_timer) { - nxt_timer_disable(&c->write_timer); - - } else if (c->write_timer.state == NXT_TIMER_BLOCKED) { - c->write_timer.state = NXT_TIMER_ACTIVE; + nxt_timer_disable(task->thread->engine, &c->write_timer); } if (c->socket.error == 0 |