Don't send WINDOW_UPDATE automatically if SPDYLAY_OPT_NO_AUTO_WINDOW_UPDATE
is set.
This commit is contained in:
parent
d6a03f74b7
commit
fa04757ff4
|
@ -2255,7 +2255,8 @@ static int spdylay_session_process_data_frame(spdylay_session *session)
|
|||
|
||||
/*
|
||||
* Accumulates received bytes |delta_size| and decides whether to send
|
||||
* WINDOW_UPDATE.
|
||||
* WINDOW_UPDATE. If SPDYLAY_OPT_NO_AUTO_WINDOW_UPDATE is set,
|
||||
* WINDOW_UPDATE will not be sent.
|
||||
*
|
||||
* This function returns 0 if it succeeds, or one of the following
|
||||
* negative error codes:
|
||||
|
@ -2270,7 +2271,12 @@ static int spdylay_session_update_recv_window_size(spdylay_session *session,
|
|||
spdylay_stream *stream;
|
||||
stream = spdylay_session_get_stream(session, stream_id);
|
||||
if(stream) {
|
||||
/* TODO If SPDYLAY_OPT_NO_AUTO_WINDOW_UPDATE is set and the
|
||||
application does not send WINDOW_UPDATE and the remote endpoint
|
||||
keeps sending data, stream->recv_window_size will eventually
|
||||
overflow. */
|
||||
stream->recv_window_size += delta_size;
|
||||
if(!(session->opt_flags & SPDYLAY_OPTMASK_NO_AUTO_WINDOW_UPDATE)) {
|
||||
/* This is just a heuristics. */
|
||||
/* We have to use local_settings here because it is the constraint
|
||||
the remote endpoint should honor. */
|
||||
|
@ -2286,6 +2292,7 @@ static int spdylay_session_update_recv_window_size(spdylay_session *session,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue