diff --git a/src/shrpx_http_downstream_connection.cc b/src/shrpx_http_downstream_connection.cc index 4fdcb643..f50c0f4f 100644 --- a/src/shrpx_http_downstream_connection.cc +++ b/src/shrpx_http_downstream_connection.cc @@ -782,8 +782,10 @@ void idle_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) { auto conn = static_cast(w->data); auto dconn = static_cast(conn->data); - // We don't have to check conn->expired_rt() since we restart timer - // when connection gets idle. + if (w == &conn->rt && !conn->expired_rt()) { + return; + } + if (LOG_ENABLED(INFO)) { DCLOG(INFO, dconn) << "Idle connection timeout"; }