mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
porting 1.4.4 rev. 1968 (fixed SF# 3559665, etc.)
This commit is contained in:
@@ -231,12 +231,12 @@ void SecureSocketImpl::listen(int backlog)
|
||||
void SecureSocketImpl::shutdown()
|
||||
{
|
||||
if (_pSSL)
|
||||
{
|
||||
// Don't shut down the socket more than once.
|
||||
int shutdownState = SSL_get_shutdown(_pSSL);
|
||||
bool shutdownSent = (shutdownState & SSL_SENT_SHUTDOWN) == SSL_SENT_SHUTDOWN;
|
||||
if (!shutdownSent)
|
||||
{
|
||||
{
|
||||
// Don't shut down the socket more than once.
|
||||
int shutdownState = SSL_get_shutdown(_pSSL);
|
||||
bool shutdownSent = (shutdownState & SSL_SENT_SHUTDOWN) == SSL_SENT_SHUTDOWN;
|
||||
if (!shutdownSent)
|
||||
{
|
||||
// A proper clean shutdown would require us to
|
||||
// retry the shutdown if we get a zero return
|
||||
// value, until SSL_shutdown() returns 1.
|
||||
@@ -254,7 +254,7 @@ void SecureSocketImpl::shutdown()
|
||||
|
||||
void SecureSocketImpl::close()
|
||||
{
|
||||
shutdown();
|
||||
try { shutdown(); } catch (...) { }
|
||||
_pSocket->close();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user