Merge branch 'fix-nghttp2_session_want_write'
This commit is contained in:
commit
801869a5d5
|
@ -5289,6 +5289,10 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!nghttp2_session_want_read(session)) {
|
||||||
|
return (ssize_t)inlen;
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
switch (iframe->state) {
|
switch (iframe->state) {
|
||||||
case NGHTTP2_IB_READ_CLIENT_MAGIC:
|
case NGHTTP2_IB_READ_CLIENT_MAGIC:
|
||||||
|
@ -6609,21 +6613,12 @@ int nghttp2_session_want_write(nghttp2_session *session) {
|
||||||
* response HEADERS and concurrent stream limit is reached, we don't
|
* response HEADERS and concurrent stream limit is reached, we don't
|
||||||
* want to write them.
|
* want to write them.
|
||||||
*/
|
*/
|
||||||
|
return session->aob.item || nghttp2_outbound_queue_top(&session->ob_urgent) ||
|
||||||
if (session->aob.item == NULL &&
|
nghttp2_outbound_queue_top(&session->ob_reg) ||
|
||||||
nghttp2_outbound_queue_top(&session->ob_urgent) == NULL &&
|
(!nghttp2_pq_empty(&session->root.obq) &&
|
||||||
nghttp2_outbound_queue_top(&session->ob_reg) == NULL &&
|
session->remote_window_size > 0) ||
|
||||||
(nghttp2_pq_empty(&session->root.obq) ||
|
(nghttp2_outbound_queue_top(&session->ob_syn) &&
|
||||||
session->remote_window_size == 0) &&
|
!session_is_outgoing_concurrent_streams_max(session));
|
||||||
(nghttp2_outbound_queue_top(&session->ob_syn) == NULL ||
|
|
||||||
session_is_outgoing_concurrent_streams_max(session))) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If there is no active streams and GOAWAY has been sent or
|
|
||||||
received, we are done with this session. */
|
|
||||||
return (session->goaway_flags &
|
|
||||||
(NGHTTP2_GOAWAY_SENT | NGHTTP2_GOAWAY_RECV)) == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int nghttp2_session_add_ping(nghttp2_session *session, uint8_t flags,
|
int nghttp2_session_add_ping(nghttp2_session *session, uint8_t flags,
|
||||||
|
|
Loading…
Reference in New Issue