Skip to content

Commit cff2a9a

Browse files
committed
http-improve-to-extend-logging
1 parent 334d929 commit cff2a9a

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

lib/roles/h1/ops-h1.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,11 @@ lws_h1_server_socket_service(struct lws *wsi, struct lws_pollfd *pollfd)
418418
case LWS_SSL_CAPABLE_ERROR:
419419
goto fail;
420420
case LWS_SSL_CAPABLE_MORE_SERVICE_READ:
421+
if (wsi->pending_timeout)
422+
lws_set_timeout(wsi, (enum pending_timeout)wsi->pending_timeout,
423+
wsi->pending_timeout == PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE ?
424+
(int)lws_wsi_keepalive_timeout_eff(wsi) : (int)wsi->a.context->timeout_secs);
425+
goto try_pollout;
421426
case LWS_SSL_CAPABLE_MORE_SERVICE_WRITE:
422427
if (wsi->pending_timeout)
423428
lws_set_timeout(wsi, (enum pending_timeout)wsi->pending_timeout,

lib/roles/h2/ops-h2.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,14 @@ rops_handle_POLLIN_h2(struct lws_context_per_thread *pt, struct lws *wsi,
252252
lwsl_info("%s: zero length read\n", __func__);
253253
return LWS_HPI_RET_PLEASE_CLOSE_ME;
254254
case LWS_SSL_CAPABLE_MORE_SERVICE_READ:
255+
lwsl_info("SSL Capable more service (read)\n");
256+
if (wsi->pending_timeout)
257+
lws_set_timeout(wsi, (enum pending_timeout)wsi->pending_timeout,
258+
wsi->pending_timeout == PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE ?
259+
(int)lws_wsi_keepalive_timeout_eff(wsi) : (int)wsi->a.context->timeout_secs);
260+
return LWS_HPI_RET_HANDLED;
255261
case LWS_SSL_CAPABLE_MORE_SERVICE_WRITE:
256-
lwsl_info("SSL Capable more service\n");
262+
lwsl_info("SSL Capable more service (write)\n");
257263
if (wsi->pending_timeout)
258264
lws_set_timeout(wsi, (enum pending_timeout)wsi->pending_timeout,
259265
wsi->pending_timeout == PENDING_TIMEOUT_HTTP_KEEPALIVE_IDLE ?

0 commit comments

Comments
 (0)