Commit c53c1dc6 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp2_session_resume_data: Return error if no deferred data exist

parent 580a19e0
......@@ -1848,7 +1848,8 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session,
* negative error codes:
*
* :enum:`NGHTTP2_ERR_INVALID_ARGUMENT`
* The stream does not exist or no deferred data exist.
* The stream does not exist; or no deferred data exist; or data
* was deferred by flow control.
* :enum:`NGHTTP2_ERR_NOMEM`
* Out of memory.
*/
......
......@@ -5468,14 +5468,11 @@ int nghttp2_session_resume_data(nghttp2_session *session, int32_t stream_id)
nghttp2_stream *stream;
stream = nghttp2_session_get_stream(session, stream_id);
if(stream == NULL ||
nghttp2_stream_check_deferred_by_flow_control(stream)) {
nghttp2_stream_check_deferred_by_flow_control(stream) ||
!nghttp2_stream_check_deferred_data(stream)) {
return NGHTTP2_ERR_INVALID_ARGUMENT;
}
if(!nghttp2_stream_check_deferred_data(stream)) {
return 0;
}
rv = nghttp2_stream_resume_deferred_data(stream, &session->ob_pq);
if(nghttp2_is_fatal(rv)) {
......
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