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:
parent
e588f308ac
commit
3bf3b540ad
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue