Commit 7ab42062 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Tear down connection if SETTINGS makes window size overflow

parent e74fbdf6
......@@ -2562,8 +2562,8 @@ static int nghttp2_update_remote_initial_window_size_func
arg->new_window_size,
arg->old_window_size);
if(rv != 0) {
return nghttp2_session_add_rst_stream(arg->session, stream->stream_id,
NGHTTP2_FLOW_CONTROL_ERROR);
return nghttp2_session_terminate_session(arg->session,
NGHTTP2_FLOW_CONTROL_ERROR);
}
/* If window size gets positive, push deferred DATA frame to
outbound queue. */
......@@ -2619,8 +2619,8 @@ static int nghttp2_update_local_initial_window_size_func
arg->new_window_size,
arg->old_window_size);
if(rv != 0) {
return nghttp2_session_add_rst_stream(arg->session, stream->stream_id,
NGHTTP2_FLOW_CONTROL_ERROR);
return nghttp2_session_terminate_session(arg->session,
NGHTTP2_FLOW_CONTROL_ERROR);
}
if(!(arg->session->opt_flags &
NGHTTP2_OPTMASK_NO_AUTO_STREAM_WINDOW_UPDATE)) {
......
......@@ -2791,7 +2791,10 @@ void test_nghttp2_submit_settings_update_local_window_size(void)
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(0 == nghttp2_session_on_settings_received(session, &ack_frame, 0));
CU_ASSERT(NGHTTP2_STREAM_CLOSING == stream->state);
item = nghttp2_session_get_next_ob_item(session);
CU_ASSERT(NGHTTP2_GOAWAY == OB_CTRL_TYPE(item));
CU_ASSERT(NGHTTP2_FLOW_CONTROL_ERROR == OB_CTRL(item)->goaway.error_code);
nghttp2_session_del(session);
nghttp2_frame_settings_free(&ack_frame.settings);
......
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