windows align lws_service_fd return processing with unix

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2015-12-05 09:38:50 +08:00
parent dc6e47cafc
commit dd6aaa898f

View file

@ -164,7 +164,10 @@ lws_plat_service(struct lws_context *context, int timeout_ms)
pfd->revents = LWS_POLLOUT;
n = lws_service_fd(context, pfd);
if (n < 0)
return n;
return -1;
/* if something closed, retry this slot */
if (n)
i--;
}
}