Handle non-fatal error from nghttp2_submit_data
This commit is contained in:
parent
a52ca391a2
commit
3ee7ca2cdd
|
@ -1277,11 +1277,12 @@ static int nghttp2_session_after_frame_sent(nghttp2_session *session)
|
|||
r = nghttp2_submit_data(session, NGHTTP2_FLAG_END_STREAM,
|
||||
frame->hd.stream_id, aux_data->data_prd);
|
||||
if(r != 0) {
|
||||
/* FATAL error */
|
||||
assert(r < NGHTTP2_ERR_FATAL);
|
||||
/* TODO If r is not FATAL, we should send RST_STREAM. */
|
||||
if(nghttp2_is_fatal(r)) {
|
||||
return r;
|
||||
}
|
||||
/* If r is not fatal, the only possible error is closed
|
||||
stream, so we have nothing to do here. */
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1299,11 +1300,12 @@ static int nghttp2_session_after_frame_sent(nghttp2_session *session)
|
|||
r = nghttp2_submit_data(session, NGHTTP2_FLAG_END_STREAM,
|
||||
frame->hd.stream_id, aux_data->data_prd);
|
||||
if(r != 0) {
|
||||
/* FATAL error */
|
||||
assert(r < NGHTTP2_ERR_FATAL);
|
||||
/* TODO If r is not FATAL, we should send RST_STREAM. */
|
||||
if(nghttp2_is_fatal(r)) {
|
||||
return r;
|
||||
}
|
||||
/* If r is not fatal, the only possible error is closed
|
||||
stream, so we have nothing to do here. */
|
||||
}
|
||||
}
|
||||
break;
|
||||
case NGHTTP2_HCAT_HEADERS:
|
||||
|
|
Loading…
Reference in New Issue