nghttpx: Reset connection check timer on successful write while not checking
This commit is contained in:
parent
93013f4205
commit
274b3a2296
|
@ -137,6 +137,7 @@ void writecb(struct ev_loop *loop, ev_io *w, int revents) {
|
||||||
http2session->disconnect(http2session->should_hard_fail());
|
http2session->disconnect(http2session->should_hard_fail());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
http2session->reset_connection_check_timer_if_not_checking();
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -1472,6 +1473,14 @@ void Http2Session::reset_connection_check_timer(ev_tstamp t) {
|
||||||
ev_timer_again(conn_.loop, &connchk_timer_);
|
ev_timer_again(conn_.loop, &connchk_timer_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Http2Session::reset_connection_check_timer_if_not_checking() {
|
||||||
|
if (connection_check_state_ != CONNECTION_CHECK_NONE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
reset_connection_check_timer(CONNCHK_TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
void Http2Session::connection_alive() {
|
void Http2Session::connection_alive() {
|
||||||
reset_connection_check_timer(CONNCHK_TIMEOUT);
|
reset_connection_check_timer(CONNCHK_TIMEOUT);
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,7 @@ public:
|
||||||
// require connection checking. If connection checking is already
|
// require connection checking. If connection checking is already
|
||||||
// enabled, this timeout is for PING ACK timeout.
|
// enabled, this timeout is for PING ACK timeout.
|
||||||
void reset_connection_check_timer(ev_tstamp t);
|
void reset_connection_check_timer(ev_tstamp t);
|
||||||
|
void reset_connection_check_timer_if_not_checking();
|
||||||
// Signals that connection is alive. Internally
|
// Signals that connection is alive. Internally
|
||||||
// reset_connection_check_timer() is called.
|
// reset_connection_check_timer() is called.
|
||||||
void connection_alive();
|
void connection_alive();
|
||||||
|
|
Loading…
Reference in New Issue