mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
cgi: fix h2 timeouts
This commit is contained in:
parent
0bfb172a9e
commit
af817c6532
2 changed files with 16 additions and 2 deletions
|
@ -252,7 +252,7 @@ __lws_service_timeout_check(struct lws *wsi, time_t sec)
|
|||
lws_stats_atomic_bump(wsi->context, pt, LWSSTATS_C_TIMEOUTS, 1);
|
||||
|
||||
/* no need to log normal idle keepalive timeout */
|
||||
if (wsi->pending_timeout != PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE)
|
||||
// if (wsi->pending_timeout != PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE)
|
||||
#if defined(LWS_ROLE_H1) || defined(LWS_ROLE_H2)
|
||||
lwsl_info("wsi %p: TIMEDOUT WAITING on %d "
|
||||
"(did hdr %d, ah %p, wl %d, pfd "
|
||||
|
|
|
@ -550,7 +550,7 @@ LWS_VISIBLE LWS_EXTERN int
|
|||
lws_cgi_write_split_stdout_headers(struct lws *wsi)
|
||||
{
|
||||
int n, m, cmd;
|
||||
unsigned char buf[LWS_PRE + 1024], *start = &buf[LWS_PRE], *p = start,
|
||||
unsigned char buf[LWS_PRE + 4096], *start = &buf[LWS_PRE], *p = start,
|
||||
*end = &buf[sizeof(buf) - 1 - LWS_PRE], *name,
|
||||
*value = NULL;
|
||||
char c, hrs;
|
||||
|
@ -941,6 +941,20 @@ agin:
|
|||
n += m + 2;
|
||||
}
|
||||
*/
|
||||
|
||||
#if defined(LWS_WITH_HTTP2)
|
||||
if (wsi->http2_substream) {
|
||||
struct lws *nwsi = lws_get_network_wsi(wsi);
|
||||
|
||||
__lws_set_timeout(wsi,
|
||||
PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE, 31);
|
||||
|
||||
if (!nwsi->immortal_substream_count)
|
||||
__lws_set_timeout(nwsi,
|
||||
PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE, 31);
|
||||
}
|
||||
#endif
|
||||
|
||||
cmd = LWS_WRITE_HTTP;
|
||||
if (wsi->http.cgi->content_length_seen + n ==
|
||||
wsi->http.cgi->content_length)
|
||||
|
|
Loading…
Add table
Reference in a new issue