From 888b030bae6e4efbba5470097acfb38be39627b8 Mon Sep 17 00:00:00 2001 From: shinny-chengzhi Date: Mon, 9 Jul 2018 17:33:10 +0800 Subject: [PATCH] windows: fix io hang after large deflate frame Fix I/O hang after received a large deflate frame --- lib/plat/lws-plat-win.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/plat/lws-plat-win.c b/lib/plat/lws-plat-win.c index 8ecf33687..291d4a3f7 100644 --- a/lib/plat/lws-plat-win.c +++ b/lib/plat/lws-plat-win.c @@ -316,8 +316,10 @@ _lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi) if (pfd->revents & LWS_POLLHUP) --eIdx; - if (pfd->revents) + if (pfd->revents) { + recv(pfd->fd, NULL, 0, 0); lws_service_fd_tsi(context, pfd, tsi); + } } }