From ef2bd10d948aadf10b2e3ffce1dc0dd5749ae81d Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 11 May 2012 23:02:13 +0900 Subject: [PATCH] Check window size is positive when bringing back deferred DATA frame when WINDOW_UPDATE is received. --- lib/spdylay_session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spdylay_session.c b/lib/spdylay_session.c index e1b593b..5ee1d71 100644 --- a/lib/spdylay_session.c +++ b/lib/spdylay_session.c @@ -1952,7 +1952,8 @@ int spdylay_session_on_window_update_received(spdylay_session *session, return r; } else { 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)) { int r; r = spdylay_pq_push(&session->ob_pq, stream->deferred_data);