summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-04-19 08:32:52 +0000
committerGordon Sim <gsim@apache.org>2010-04-19 08:32:52 +0000
commit2320f518e71f2043e06072541afd5e44b30fb22b (patch)
tree28c9be4bee3b506ce63e446c8327aba112c835c4 /cpp
parent8064f03b9b1f4b106be1dc9b0f2a3e3f5b555e08 (diff)
downloadqpid-python-2320f518e71f2043e06072541afd5e44b30fb22b.tar.gz
Ensure that ConnectionImpl is notified of shutdown even in the case of disconnect (which needs different handling than eof)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@935473 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/qpid/client/SslConnector.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/SslConnector.cpp b/cpp/src/qpid/client/SslConnector.cpp
index 990ca90de7..4be8fcaa04 100644
--- a/cpp/src/qpid/client/SslConnector.cpp
+++ b/cpp/src/qpid/client/SslConnector.cpp
@@ -110,6 +110,7 @@ class SslConnector : public Connector
void writebuff(qpid::sys::ssl::SslIO&);
void writeDataBlock(const framing::AMQDataBlock& data);
void eof(qpid::sys::ssl::SslIO&);
+ void disconnected(qpid::sys::ssl::SslIO&);
std::string identifier;
@@ -201,7 +202,7 @@ void SslConnector::connect(const std::string& host, int port){
aio = new SslIO(socket,
boost::bind(&SslConnector::readbuff, this, _1, _2),
boost::bind(&SslConnector::eof, this, _1),
- boost::bind(&SslConnector::eof, this, _1),
+ boost::bind(&SslConnector::disconnected, this, _1),
boost::bind(&SslConnector::socketClosed, this, _1, _2),
0, // nobuffs
boost::bind(&SslConnector::writebuff, this, _1));
@@ -362,6 +363,11 @@ void SslConnector::eof(SslIO&) {
close();
}
+void SslConnector::disconnected(SslIO&) {
+ close();
+ socketClosed(*aio, socket);
+}
+
const SecuritySettings* SslConnector::getSecuritySettings()
{
securitySettings.ssf = socket.getKeyLen();