Commit fe752174 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpd: Close connection after settings timeout and GOAWAY was sent

parent 494ed221
...@@ -326,9 +326,13 @@ void on_session_closed(Http2Handler *hd, int64_t session_id) { ...@@ -326,9 +326,13 @@ void on_session_closed(Http2Handler *hd, int64_t session_id) {
namespace { namespace {
void settings_timeout_cb(struct ev_loop *loop, ev_timer *w, int revents) { void settings_timeout_cb(struct ev_loop *loop, ev_timer *w, int revents) {
int rv;
auto hd = static_cast<Http2Handler *>(w->data); auto hd = static_cast<Http2Handler *>(w->data);
hd->terminate_session(NGHTTP2_SETTINGS_TIMEOUT); hd->terminate_session(NGHTTP2_SETTINGS_TIMEOUT);
hd->on_write(); rv = hd->on_write();
if (rv == -1) {
delete_handler(hd);
}
} }
} // namespace } // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment