mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-23 00:00:06 +01:00
Detect dead socket on iOS when server closed connection
It aims to solve the ticket issue #1129 (https://github.com/warmcat/libwebsockets/issues/1129).
This commit is contained in:
parent
55f97b7806
commit
bce3f98f1b
1 changed files with 1 additions and 1 deletions
|
@ -463,7 +463,7 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)
|
|||
|
||||
lwsl_debug("%p: SSL_read says %d\n", wsi, n);
|
||||
/* manpage: returning 0 means connection shut down */
|
||||
if (!n) {
|
||||
if (!n || (n == -1 && errno == ENOTCONN)) {
|
||||
wsi->socket_is_permanently_unusable = 1;
|
||||
|
||||
return LWS_SSL_CAPABLE_ERROR;
|
||||
|
|
Loading…
Add table
Reference in a new issue