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

win: trigger context destroy if pt destroying itself

https://github.com/warmcat/libwebsockets/issues/3182

This follows the flow for *nix
This commit is contained in:
Andy Green 2024-09-25 09:35:39 +01:00
parent 8fc7596fec
commit f7aeadeb0e

View file

@ -177,6 +177,11 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
// lwsl_notice("%s: idx %d, revents 0x%x\n", __func__, n, pt->fds[n].revents);
lws_service_fd_tsi(context, &pt->fds[n], tsi);
}
if (pt->destroy_self) {
lws_context_destroy(pt->context);
return -1;
}
return 0;
}