diff options
author | Justin Chen <justinchen00@github.invalid.com> | 2016-04-14 21:42:11 +0800 |
---|---|---|
committer | Andy Green <andy@warmcat.com> | 2016-04-14 21:42:11 +0800 |
commit | edb92ee3c75fac5e25723d9e4dd6417f02222cb0 (patch) | |
tree | 26c958931de5afb11834af9629739ecd9d861ea8 | |
parent | c06ea5c7d7484d3978d2626f19741e3ecb6c0acb (diff) | |
download | libwebsockets-edb92ee3c75fac5e25723d9e4dd6417f02222cb0.tar.gz libwebsockets-edb92ee3c75fac5e25723d9e4dd6417f02222cb0.tar.bz2 libwebsockets-edb92ee3c75fac5e25723d9e4dd6417f02222cb0.zip |
recv treat zero return as error
https://github.com/warmcat/libwebsockets/issues/475
-rw-r--r-- | lib/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/output.c b/lib/output.c index 0d850ebe..11f88e82 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 || |