diff --git a/lib/output.c b/lib/output.c index 11f88e8211d7beaba7268ca5c6fd3e0958c9dd7c..0d850ebe8e64c615799ed229f1fc6d6b6bbee8a6 100644 --- a/lib/output.c +++ b/lib/output.c @@ -622,7 +622,7 @@ lws_ssl_capable_read_no_ssl(struct lws *wsi, unsigned char *buf, int len) int n; n = recv(wsi->sock, (char *)buf, len, 0); - if (n > 0) + if (n >= 0) return n; #if LWS_POSIX if (LWS_ERRNO == LWS_EAGAIN ||