From 0eb2e1b3b3235667b93637c6839739d4a8ffbcab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= Date: Sun, 24 Nov 2024 21:04:37 +0100 Subject: [PATCH] fix(NetSSL): handle EWOULDBLOCK when calling SSL_shutdown() --- NetSSL_OpenSSL/src/SecureSocketImpl.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/NetSSL_OpenSSL/src/SecureSocketImpl.cpp b/NetSSL_OpenSSL/src/SecureSocketImpl.cpp index a68cb917a..ce03396e8 100644 --- a/NetSSL_OpenSSL/src/SecureSocketImpl.cpp +++ b/NetSSL_OpenSSL/src/SecureSocketImpl.cpp @@ -264,7 +264,13 @@ int SecureSocketImpl::shutdown() if (!shutdownSent) { int rc = ::SSL_shutdown(_pSSL); - if (rc < 0) rc = handleError(rc); + if (rc < 0) + { + if (SocketImpl::lastError() == POCO_EWOULDBLOCK) + rc = SecureStreamSocket::ERR_SSL_WANT_WRITE; + else + rc = handleError(rc); + } l.unlock();