Skip to content

Commit

Permalink
Fix bug that connection window is consumed excessively
Browse files Browse the repository at this point in the history
Previously we consider bytes as consumed in spdylay_session_mem_recv()
even if it is not ignored and is passing to application.  As a result,
excessive number of bytes are considered as consumed and library sends
excessive amount of WINDOW_UPDATE to peer.  This commit fixes this
bug.
  • Loading branch information
tatsuhiro-t committed Aug 24, 2014
1 parent e9184dd commit d1e8fa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/spdylay_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -2827,7 +2827,8 @@ ssize_t spdylay_session_mem_recv(spdylay_session *session,
return r;
}

if(session->opt_flags & SPDYLAY_OPTMASK_NO_AUTO_WINDOW_UPDATE2) {
if(session->iframe.state == SPDYLAY_RECV_PAYLOAD_IGN &&
(session->opt_flags & SPDYLAY_OPTMASK_NO_AUTO_WINDOW_UPDATE2)) {
r = spdylay_session_update_connection_consumed_size
(session, readlen);

Expand Down

0 comments on commit d1e8fa1

Please sign in to comment.