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:
a4d2364
)
client: zero length read indicates peer shutdown
author
Andy Green
<andy@warmcat.com>
Sat, 25 Mar 2017 00:47:06 +0000
(08:47 +0800)
committer
Andy Green
<andy@warmcat.com>
Sat, 25 Mar 2017 00:47:30 +0000
(08:47 +0800)
lib/service.c
patch
|
blob
|
history
diff --git
a/lib/service.c
b/lib/service.c
index c7bb06fb167f09bf14169cb0c3f1368e4913613d..b7423014a9c732ca97a531069d232f032e26f13f 100644
(file)
--- a/
lib/service.c
+++ b/
lib/service.c
@@
-566,7
+566,10
@@
lws_http_client_read(struct lws *wsi, char **buf, int *len)
return -1;
}
- if (rlen <= 0)
+ if (rlen == 0)
+ return -1;
+
+ if (rlen < 0)
return 0;
*len = rlen;
@@
-1105,7
+1108,7
@@
drain:
wsi->protocol->callback,
wsi, LWS_CALLBACK_RECEIVE_CLIENT_HTTP,
wsi->user_space, NULL, 0)) {
- lwsl_
debug
("LWS_CALLBACK_RECEIVE_CLIENT_HTTP closed it\n");
+ lwsl_
notice
("LWS_CALLBACK_RECEIVE_CLIENT_HTTP closed it\n");
goto close_and_handled;
}
}