mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
win32: upscale timeout_ms to 64-bit int
This may help with this: https://github.com/warmcat/libwebsockets/issues/3201
This commit is contained in:
parent
51c47daea3
commit
86819f05af
1 changed files with 5 additions and 4 deletions
|
@ -63,6 +63,7 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
|
|||
struct lws_context_per_thread *pt;
|
||||
struct lws_pollfd *pfd;
|
||||
lws_usec_t timeout_us;
|
||||
int64_t timeout_ms64 = (int64_t)timeout_ms;
|
||||
struct lws *wsi;
|
||||
unsigned int i;
|
||||
int n;
|
||||
|
@ -85,12 +86,12 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
|
|||
pt->service_tid_detected = 1;
|
||||
}
|
||||
|
||||
if (timeout_ms < 0)
|
||||
timeout_ms = 0;
|
||||
if (timeout_ms64 < 0)
|
||||
timeout_ms64 = 0;
|
||||
else
|
||||
/* force a default timeout of 23 days */
|
||||
timeout_ms = 2000000000;
|
||||
timeout_us = ((lws_usec_t)timeout_ms) * LWS_US_PER_MS;
|
||||
timeout_ms64 = 2000000000;
|
||||
timeout_us = ((lws_usec_t)timeout_ms64) * LWS_US_PER_MS;
|
||||
|
||||
if (context->event_loop_ops->run_pt)
|
||||
context->event_loop_ops->run_pt(context, tsi);
|
||||
|
|
Loading…
Add table
Reference in a new issue