Skip to content
Snippets Groups Projects
Commit 5f74010e authored by Andy Green's avatar Andy Green
Browse files

service: only apply trunc holds rx rule for http2

parent d2ec3295
No related branches found
No related tags found
No related merge requests found
...@@ -528,10 +528,15 @@ next_child: ...@@ -528,10 +528,15 @@ next_child:
notify: notify:
#endif #endif
wsi->handling_pollout = 0;
wsi->leave_pollout_active = 0; wsi->leave_pollout_active = 0;
return lws_calllback_as_writeable(wsi); n = lws_calllback_as_writeable(wsi);
wsi->handling_pollout = 0;
if (wsi->leave_pollout_active)
lws_change_pollfd(wsi, 0, LWS_POLLOUT);
return n;
/* /*
* since these don't disable the POLLOUT, they are always doing the * since these don't disable the POLLOUT, they are always doing the
...@@ -1343,14 +1348,16 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t ...@@ -1343,14 +1348,16 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t
break; break;
#if defined(LWS_WITH_HTTP2) #if defined(LWS_WITH_HTTP2)
wsi1 = lws_get_network_wsi(wsi); if (wsi->http2_substream || wsi->upgraded_to_http2) {
if (wsi1 && wsi1->trunc_len) wsi1 = lws_get_network_wsi(wsi);
/* We cannot deal with any kind of new RX if (wsi1 && wsi1->trunc_len)
* because we are dealing with a partial send /* We cannot deal with any kind of new RX
* (new RX may trigger new http_action() that expect * because we are dealing with a partial send
* to be able to send) * (new RX may trigger new http_action() that
*/ * expect to be able to send)
break; */
break;
}
#endif #endif
/* 2: RX Extension needs to be drained /* 2: RX Extension needs to be drained
...@@ -1386,8 +1393,7 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t ...@@ -1386,8 +1393,7 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t
if (wsi->rxflow_buffer) { if (wsi->rxflow_buffer) {
lwsl_info("draining rxflow (len %d)\n", lwsl_info("draining rxflow (len %d)\n",
wsi->rxflow_len - wsi->rxflow_pos wsi->rxflow_len - wsi->rxflow_pos);
);
assert(wsi->rxflow_pos < wsi->rxflow_len); assert(wsi->rxflow_pos < wsi->rxflow_len);
/* well, drain it */ /* well, drain it */
eff_buf.token = (char *)wsi->rxflow_buffer + eff_buf.token = (char *)wsi->rxflow_buffer +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment