diff options
Diffstat (limited to 'cpp/src/IceSSL/SslTransceiver.cpp')
-rw-r--r-- | cpp/src/IceSSL/SslTransceiver.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cpp/src/IceSSL/SslTransceiver.cpp b/cpp/src/IceSSL/SslTransceiver.cpp index 1a3970fbaf0..13b3952b308 100644 --- a/cpp/src/IceSSL/SslTransceiver.cpp +++ b/cpp/src/IceSSL/SslTransceiver.cpp @@ -54,6 +54,12 @@ IceSSL::SslTransceiver::fd() void IceSSL::SslTransceiver::close() { + if(_fd == INVALID_SOCKET) + { + // Ignore - the connection was never set up. + return; + } + if(_traceLevels->network >= 1) { Trace out(_logger, _traceLevels->networkCat); @@ -315,6 +321,8 @@ IceSSL::SslTransceiver::forceHandshake() out << "Handshake retry maximum reached.\n" << toString(); } + close(); + // If the handshake fails, the connection failed. ConnectFailedException ex(__FILE__, __LINE__); #ifdef _WIN32 |