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

windows: null check wsi before udp check

This commit is contained in:
casey 2020-10-08 20:13:33 -04:00 committed by Andy Green
parent d945699791
commit c2028b53d2

View file

@ -304,7 +304,8 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
* on the TCP connection. But it breaks UDP, so only
* do it on non-UDP.
*/
if (!wsi_from_fd(context, pfd->fd)->udp)
wsi = wsi_from_fd(context, pfd->fd);
if (wsi && !wsi->udp)
recv(pfd->fd, NULL, 0, 0);
lws_service_fd_tsi(context, pfd, tsi);