diff --git a/src/HttpServer.cc b/src/HttpServer.cc index 0c446400..e4ae1770 100644 --- a/src/HttpServer.cc +++ b/src/HttpServer.cc @@ -352,7 +352,7 @@ namespace { void settings_timeout_cb(evutil_socket_t fd, short what, void *arg) { auto hd = reinterpret_cast(arg); - hd->submit_goaway(NGHTTP2_SETTINGS_TIMEOUT); + hd->fail_session(NGHTTP2_SETTINGS_TIMEOUT); hd->on_write(); } } // namespace @@ -581,9 +581,9 @@ void Http2Handler::remove_settings_timer() } } -void Http2Handler::submit_goaway(nghttp2_error_code error_code) +void Http2Handler::fail_session(nghttp2_error_code error_code) { - nghttp2_submit_goaway(session_, NGHTTP2_FLAG_NONE, error_code, NULL, 0); + nghttp2_session_fail_session(session_, error_code); } namespace { diff --git a/src/HttpServer.h b/src/HttpServer.h index 162ede51..341cb727 100644 --- a/src/HttpServer.h +++ b/src/HttpServer.h @@ -119,7 +119,7 @@ public: size_t get_left_connhd_len() const; void set_left_connhd_len(size_t left); void remove_settings_timer(); - void submit_goaway(nghttp2_error_code error_code); + void fail_session(nghttp2_error_code error_code); private: std::map> id2req_; int64_t session_id_;