force service properly when unconsumed rxbuf in ah

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2016-02-26 10:48:51 +08:00
parent 58cc41bc1c
commit 1bcc110299

View file

@ -158,15 +158,16 @@ lws_plat_service_tsi(struct lws_context *context, int timeout_ms, int tsi)
return 0;
}
if (n < 0) {
if (LWS_ERRNO != LWS_EINTR)
return -1;
return 0;
}
c = n;
lws_service_flag_pending(context, tsi);
m = lws_service_flag_pending(context, tsi);
if (m)
c = -1; /* unknown limit */
else
if (n < 0) {
if (LWS_ERRNO != LWS_EINTR)
return -1;
return 0;
} else
c = n;
/* any socket with events to service? */
for (n = 0; n < pt->fds_count && c; n++) {