Remove unnecessary function

on_stream_close is called after on_frame_not_send_callback with
success=false without this function.
This commit is contained in:
Tatsuhiro Tsujikawa 2021-02-23 14:32:43 +09:00
parent 579fa6ea93
commit 276792a812
1 changed files with 0 additions and 20 deletions

View File

@ -105,23 +105,6 @@ int on_stream_close_callback(nghttp2_session *session, int32_t stream_id,
} }
} // namespace } // namespace
namespace {
int on_frame_not_send_callback(nghttp2_session *session,
const nghttp2_frame *frame, int lib_error_code,
void *user_data) {
if (frame->hd.type != NGHTTP2_HEADERS ||
frame->headers.cat != NGHTTP2_HCAT_REQUEST) {
return 0;
}
auto client = static_cast<Client *>(user_data);
// request was not sent. Mark it as error.
client->on_stream_close(frame->hd.stream_id, false);
return 0;
}
} // namespace
namespace { namespace {
int before_frame_send_callback(nghttp2_session *session, int before_frame_send_callback(nghttp2_session *session,
const nghttp2_frame *frame, void *user_data) { const nghttp2_frame *frame, void *user_data) {
@ -211,9 +194,6 @@ void Http2Session::on_connect() {
nghttp2_session_callbacks_set_on_header_callback(callbacks, nghttp2_session_callbacks_set_on_header_callback(callbacks,
on_header_callback); on_header_callback);
nghttp2_session_callbacks_set_on_frame_not_send_callback(
callbacks, on_frame_not_send_callback);
nghttp2_session_callbacks_set_before_frame_send_callback( nghttp2_session_callbacks_set_before_frame_send_callback(
callbacks, before_frame_send_callback); callbacks, before_frame_send_callback);