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

windows: pipe: avoid busy loop in windows pipe event

This commit is contained in:
terry.lu 2021-01-27 15:56:23 +08:00 committed by Andy Green
parent e588f308ac
commit 3bf3b540ad

View file

@ -51,6 +51,13 @@ rops_handle_POLLIN_pipe(struct lws_context_per_thread *pt, struct lws *wsi,
(void)n;
if (n < 0)
return LWS_HPI_RET_PLEASE_CLOSE_ME;
#elif defined(WIN32)
char s[100];
int n;
n = recv(wsi->desc.sockfd, s, sizeof(s), 0);
if (n == SOCKET_ERROR)
return LWS_HPI_RET_PLEASE_CLOSE_ME;
#endif
#if defined(LWS_WITH_THREADPOOL)