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:
35c80f9
)
ssl output handle want read write
author
Andy Green
<andy.green@linaro.org>
Sun, 23 Mar 2014 04:02:52 +0000
(12:02 +0800)
committer
Andy Green
<andy.green@linaro.org>
Sun, 23 Mar 2014 04:02:52 +0000
(12:02 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
lib/output.c
patch
|
blob
|
history
diff --git
a/lib/output.c
b/lib/output.c
index
e18a09a
..
cad6897
100644
(file)
--- a/
lib/output.c
+++ b/
lib/output.c
@@
-157,9
+157,12
@@
int lws_issue_raw(struct libwebsocket *wsi, unsigned char *buf, size_t len)
n = SSL_write(wsi->ssl, buf, len);
lws_latency(context, wsi, "SSL_write lws_issue_raw", n, n >= 0);
if (n < 0) {
- if (LWS_ERRNO == LWS_EAGAIN || LWS_ERRNO == LWS_EINTR) {
+ n = SSL_get_error(wsi->ssl, n);
+ if (n == SSL_ERROR_WANT_READ ||
+ n == SSL_ERROR_WANT_WRITE) {
n = 0;
goto handle_truncated_send;
+
}
lwsl_debug("ERROR writing to socket\n");
return -1;