mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
Detect dead socket on iOS when server closed connection
This commit is contained in:
parent
e8e448df3e
commit
f3c6fac3cb
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,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