fix(NetSSL): handle EWOULDBLOCK when calling SSL_shutdown()

This commit is contained in:
Günter Obiltschnig 2024-11-24 21:04:37 +01:00
parent 28a08434c6
commit 0eb2e1b3b3

View File

@ -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();