summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conn_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_conn_read.c')
-rw-r--r--src/nxt_conn_read.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/nxt_conn_read.c b/src/nxt_conn_read.c
index 98c5e425..7f738de5 100644
--- a/src/nxt_conn_read.c
+++ b/src/nxt_conn_read.c
@@ -104,18 +104,13 @@ nxt_conn_io_read(nxt_task_t *task, void *obj, void *data)
c->socket.read_handler = c->io->read;
c->socket.error_handler = state->error_handler;
- if (c->read_timer.state == NXT_TIMER_DISABLED
- || nxt_fd_event_is_disabled(c->socket.read))
- {
- /* Timer may be set or reset. */
- nxt_conn_timer(engine, c, state, &c->read_timer);
-
- if (nxt_fd_event_is_disabled(c->socket.read)) {
- nxt_fd_event_enable_read(engine, &c->socket);
- }
+ if (nxt_fd_event_is_disabled(c->socket.read)) {
+ nxt_fd_event_enable_read(engine, &c->socket);
}
- return;
+ if (state->timer_autoreset || c->read_timer.state == NXT_TIMER_DISABLED) {
+ nxt_conn_timer(engine, c, state, &c->read_timer);
+ }
}