nghttpd: Use nghttp2_session_fail_session instead of nghttp2_submit_goaway

This commit is contained in:
Tatsuhiro Tsujikawa 2013-12-25 00:40:57 +09:00
parent ee6df1f065
commit 04e496d7bd
2 changed files with 4 additions and 4 deletions

View File

@ -352,7 +352,7 @@ namespace {
void settings_timeout_cb(evutil_socket_t fd, short what, void *arg) void settings_timeout_cb(evutil_socket_t fd, short what, void *arg)
{ {
auto hd = reinterpret_cast<Http2Handler*>(arg); auto hd = reinterpret_cast<Http2Handler*>(arg);
hd->submit_goaway(NGHTTP2_SETTINGS_TIMEOUT); hd->fail_session(NGHTTP2_SETTINGS_TIMEOUT);
hd->on_write(); hd->on_write();
} }
} // namespace } // 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 { namespace {

View File

@ -119,7 +119,7 @@ public:
size_t get_left_connhd_len() const; size_t get_left_connhd_len() const;
void set_left_connhd_len(size_t left); void set_left_connhd_len(size_t left);
void remove_settings_timer(); void remove_settings_timer();
void submit_goaway(nghttp2_error_code error_code); void fail_session(nghttp2_error_code error_code);
private: private:
std::map<int32_t, std::unique_ptr<Request>> id2req_; std::map<int32_t, std::unique_ptr<Request>> id2req_;
int64_t session_id_; int64_t session_id_;