nghttpx: Fix bug that idle timer is used after reuse

This commit is contained in:
Tatsuhiro Tsujikawa 2015-07-15 23:18:32 +09:00
parent e63e775fea
commit 20e63151a5
1 changed files with 2 additions and 0 deletions

View File

@ -205,6 +205,8 @@ int HttpDownstreamConnection::attach_downstream(Downstream *downstream) {
ev_set_cb(&conn_.rev, readcb);
conn_.rt.repeat = get_config()->downstream_read_timeout;
// we may set read timer cb to idle_timeoutcb. Reset again.
ev_set_cb(&conn_.rt, timeoutcb);
ev_timer_again(conn_.loop, &conn_.rt);
// TODO we should have timeout for connection establishment
ev_timer_again(conn_.loop, &conn_.wt);