recv treat zero return as error
https://github.com/warmcat/libwebsockets/issues/475
This commit is contained in:
parent
f3e9c7347e
commit
30cdb3ac8f
1 changed files with 1 additions and 1 deletions
|
@ -630,7 +630,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 ||
|
||||
|
|
Loading…
Add table
Reference in a new issue