nghttpx: Fix bug that h1 backend idle timeout expires sooner

This commit is contained in:
Tatsuhiro Tsujikawa 2018-02-02 21:09:04 +09:00
parent e098a21132
commit c1a496cf4e
1 changed files with 4 additions and 2 deletions

View File

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