projects
/
platform
/
upstream
/
libwebsockets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c06ea5c
)
recv treat zero return as error
author
Justin Chen
<justinchen00@github.invalid.com>
Thu, 14 Apr 2016 13:42:11 +0000
(21:42 +0800)
committer
Andy Green
<andy@warmcat.com>
Thu, 14 Apr 2016 13:42:11 +0000
(21:42 +0800)
https://github.com/warmcat/libwebsockets/issues/475
lib/output.c
patch
|
blob
|
history
diff --git
a/lib/output.c
b/lib/output.c
index 0d850ebe8e64c615799ed229f1fc6d6b6bbee8a6..11f88e8211d7beaba7268ca5c6fd3e0958c9dd7c 100644
(file)
--- 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 ||