Fix MbedTLS disconnect handling. (#500)

This commit is contained in:
Paul Whiting 2024-03-18 23:23:14 -06:00 committed by GitHub
parent 70602c4e6b
commit 39e085bebc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -352,6 +352,11 @@ namespace ix
return res; return res;
} }
if (res == 0)
{
errno = ECONNRESET;
}
if (res == MBEDTLS_ERR_SSL_WANT_READ || res == MBEDTLS_ERR_SSL_WANT_WRITE) if (res == MBEDTLS_ERR_SSL_WANT_READ || res == MBEDTLS_ERR_SSL_WANT_WRITE)
{ {
errno = EWOULDBLOCK; errno = EWOULDBLOCK;