nghttpx: Treat backend failure if SETTINGS is not received within timeout

This commit is contained in:
Tatsuhiro Tsujikawa 2016-05-19 23:12:34 +09:00
parent 863fbffda4
commit d1968c4465
1 changed files with 5 additions and 0 deletions

View File

@ -92,6 +92,11 @@ void settings_timeout_cb(struct ev_loop *loop, ev_timer *w, int revents) {
auto http2session = static_cast<Http2Session *>(w->data);
http2session->stop_settings_timer();
SSLOG(INFO, http2session) << "SETTINGS timeout";
auto addr = http2session->get_addr();
auto &connect_blocker = addr->connect_blocker;
connect_blocker->on_failure();
if (http2session->terminate_session(NGHTTP2_SETTINGS_TIMEOUT) != 0) {
delete http2session;