1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

libuv: fix idle being stopped when there is still pending stuff

https://github.com/warmcat/libwebsockets/pull/3008
This commit is contained in:
Lonny Wong 2023-11-17 00:58:08 +08:00 committed by Andy Green
parent 3179273eae
commit 8a190f2758

View file

@ -82,8 +82,9 @@ lws_uv_idle(uv_idle_t *handle
uv_timer_start(&pt_to_priv_uv(pt)->sultimer, lws_uv_sultimer_cb,
LWS_US_TO_MS((uint64_t)us), 0);
/* there is nobody who needs service forcing, shut down idle */
uv_idle_stop(handle);
/* if there is nobody who needs service forcing, shut down idle */
if (lws_service_adjust_timeout(pt->context, 1, pt->tid))
uv_idle_stop(handle);
lws_pt_unlock(pt);
lws_context_unlock(pt->context);