rev->handler = ngx_http_v2_read_handler;
c->write->handler = ngx_http_v2_write_handler;
+ if (c->read->timer_set) {
+ ngx_del_timer(c->read);
+ }
+
c->idle = 1;
ngx_reusable_connection(c, 0);
h2c->blocked = 0;
- if (h2c->processing || h2c->pushing) {
- if (rev->timer_set) {
- ngx_del_timer(rev);
- }
-
- return;
- }
-
ngx_http_v2_handle_connection(h2c);
}
ngx_int_t rc;
ngx_connection_t *c;
ngx_http_core_loc_conf_t *clcf;
- ngx_http_core_srv_conf_t *cscf;
if (h2c->last_out || h2c->processing || h2c->pushing) {
return;
return;
}
+ clcf = ngx_http_get_module_loc_conf(h2c->http_connection->conf_ctx,
+ ngx_http_core_module);
+
+ if (!c->read->timer_set) {
+ ngx_add_timer(c->read, clcf->keepalive_timeout);
+ }
+
ngx_reusable_connection(c, 1);
if (h2c->state.incomplete) {
- if (!c->read->timer_set) {
- cscf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
- ngx_http_core_module);
- ngx_add_timer(c->read, cscf->client_header_timeout);
- }
-
return;
}
if (c->write->timer_set) {
ngx_del_timer(c->write);
}
-
- clcf = ngx_http_get_module_loc_conf(h2c->http_connection->conf_ctx,
- ngx_http_core_module);
-
- ngx_add_timer(c->read, clcf->keepalive_timeout);
}
h2c->priority_limit += h2scf->concurrent_streams;
+ if (h2c->connection->read->timer_set) {
+ ngx_del_timer(h2c->connection->read);
+ }
+
return stream;
}
c->destroyed = 0;
ngx_reusable_connection(c, 0);
- if (c->read->timer_set) {
- ngx_del_timer(c->read);
- }
-
h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
ngx_http_v2_module);