diff --git a/lib/roles/http/client/client.c b/lib/roles/http/client/client.c index f4a4d5bdc..d39f8f430 100644 --- a/lib/roles/http/client/client.c +++ b/lib/roles/http/client/client.c @@ -1164,7 +1164,8 @@ lws_http_client_read(struct lws *wsi, char **buf, int *len) // lwsl_notice("%s: rlen %d\n", __func__, rlen); /* allow the source to signal he has data again next time */ - lws_change_pollfd(wsi, 0, LWS_POLLIN); + if (lws_change_pollfd(wsi, 0, LWS_POLLIN)) + return -1; if (rlen == LWS_SSL_CAPABLE_ERROR) { lwsl_debug("%s: SSL capable error\n", __func__);