nghttp2_session_resume_data: Return error if no deferred data exist
This commit is contained in:
parent
580a19e097
commit
c53c1dc669
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue