Check window size is positive when bringing back deferred DATA frame

when WINDOW_UPDATE is received.
This commit is contained in:
Tatsuhiro Tsujikawa 2012-05-11 23:02:13 +09:00
parent 9b619e5dd7
commit ef2bd10d94
1 changed files with 2 additions and 1 deletions

View File

@ -1952,7 +1952,8 @@ int spdylay_session_on_window_update_received(spdylay_session *session,
return r; return r;
} else { } else {
stream->window_size += frame->window_update.delta_window_size; stream->window_size += frame->window_update.delta_window_size;
if(stream->deferred_data != NULL && if(stream->window_size > 0 &&
stream->deferred_data != NULL &&
(stream->deferred_flags & SPDYLAY_DEFERRED_FLOW_CONTROL)) { (stream->deferred_flags & SPDYLAY_DEFERRED_FLOW_CONTROL)) {
int r; int r;
r = spdylay_pq_push(&session->ob_pq, stream->deferred_data); r = spdylay_pq_push(&session->ob_pq, stream->deferred_data);