diff options
author | Gordon Sim <gsim@apache.org> | 2009-04-28 20:57:58 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2009-04-28 20:57:58 +0000 |
commit | b97244e49105b7adda0d8798383ea63c1986fed6 (patch) | |
tree | 5d5ebe0785d3bc4cf7b536f3e5a5582e4526db80 /cpp/src | |
parent | 6beaf665b8e3668129e9821251d30721f2e32bef (diff) | |
download | qpid-python-b97244e49105b7adda0d8798383ea63c1986fed6.tar.gz |
Ensure socket is closed when exception occurs during encode/decode.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@769532 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/client/Connector.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/Connector.cpp b/cpp/src/qpid/client/Connector.cpp index c251233082..fa2c75429f 100644 --- a/cpp/src/qpid/client/Connector.cpp +++ b/cpp/src/qpid/client/Connector.cpp @@ -391,11 +391,13 @@ void TCPConnector::run() { aio->start(poller); d.run(); - socket.close(); } catch (const std::exception& e) { QPID_LOG(error, QPID_MSG("FAIL " << identifier << ": " << e.what())); handleClosed(); } + try { + socket.close(); + } catch (const std::exception& e) {} } void TCPConnector::activateSecurityLayer(std::auto_ptr<qpid::sys::SecurityLayer> sl) |