- don't throw if SSL client unexpectedly closes connection as this seems to be the normal behavior of web browsers (seen with Chrome and IE)

This commit is contained in:
Guenter Obiltschnig
2014-10-02 14:58:45 +02:00
parent edf4645cf9
commit 84adc737d4

View File

@@ -433,7 +433,15 @@ int SecureSocketImpl::handleError(int rc)
long lastError = ERR_get_error();
if (lastError == 0)
{
if (rc == 0 || rc == -1)
if (rc == 0)
{
// Most web browsers do this, don't report an error
if (_pContext->isForServerUse())
return 0;
else
throw SSLConnectionUnexpectedlyClosedException();
}
else if (rc == -1)
{
throw SSLConnectionUnexpectedlyClosedException();
}