nghttpd: Close connection after settings timeout and GOAWAY was sent

This commit is contained in:
Tatsuhiro Tsujikawa 2015-05-18 21:38:12 +09:00
parent 494ed221b6
commit fe752174a9
1 changed files with 5 additions and 1 deletions

View File

@ -326,9 +326,13 @@ void on_session_closed(Http2Handler *hd, int64_t session_id) {
namespace {
void settings_timeout_cb(struct ev_loop *loop, ev_timer *w, int revents) {
int rv;
auto hd = static_cast<Http2Handler *>(w->data);
hd->terminate_session(NGHTTP2_SETTINGS_TIMEOUT);
hd->on_write();
rv = hd->on_write();
if (rv == -1) {
delete_handler(hd);
}
}
} // namespace