Skip to content

Commit 39e085b

Browse files
Fix MbedTLS disconnect handling. (#500)
1 parent 70602c4 commit 39e085b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ixwebsocket/IXSocketMbedTLS.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,11 @@ namespace ix
352352
return res;
353353
}
354354

355+
if (res == 0)
356+
{
357+
errno = ECONNRESET;
358+
}
359+
355360
if (res == MBEDTLS_ERR_SSL_WANT_READ || res == MBEDTLS_ERR_SSL_WANT_WRITE)
356361
{
357362
errno = EWOULDBLOCK;

0 commit comments

Comments
 (0)