From d1968c44659960f4c7bc60561027b42e8ff6fc61 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 19 May 2016 23:12:34 +0900 Subject: [PATCH] nghttpx: Treat backend failure if SETTINGS is not received within timeout --- src/shrpx_http2_session.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index f33ac031..9e1b5bad 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -92,6 +92,11 @@ void settings_timeout_cb(struct ev_loop *loop, ev_timer *w, int revents) { auto http2session = static_cast(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;