diff options
author | Gordon Sim <gsim@apache.org> | 2007-08-16 07:46:18 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-08-16 07:46:18 +0000 |
commit | 9295d5d321ac40a7c2c330af7ca3598d8d039d4c (patch) | |
tree | b5049c4993bb00fd5c5a4c855f3984e09fdff23d /cpp/src/qpid/client/ClientChannel.cpp | |
parent | 874ac4d63c3fab96e73ca9327617c26d51681c73 (diff) | |
download | qpid-python-9295d5d321ac40a7c2c330af7ca3598d8d039d4c.tar.gz |
Bug fix for client shutdown.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566527 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ClientChannel.cpp')
-rw-r--r-- | cpp/src/qpid/client/ClientChannel.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/cpp/src/qpid/client/ClientChannel.cpp b/cpp/src/qpid/client/ClientChannel.cpp index 3cf0373b7f..b36fc82b21 100644 --- a/cpp/src/qpid/client/ClientChannel.cpp +++ b/cpp/src/qpid/client/ClientChannel.cpp @@ -137,21 +137,6 @@ void Channel::rollback(){ session->txRollback(); } -void Channel::close() -{ - session->close(); - { - Mutex::ScopedLock l(lock); - if (connection); - { - session.reset(); - sessionCore.reset(); - connection.reset(); - } - } - stop(); -} - void Channel::consume( Queue& queue, const std::string& tag, MessageListener* listener, AckMode ackMode, bool noLocal, bool synch, const FieldTable* fields) { @@ -211,6 +196,20 @@ void Channel::publish(const Message& msg, const Exchange& exchange, session->basicPublish(0, e, key, mandatory, immediate, msg); } +void Channel::close() +{ + session->close(); + { + Mutex::ScopedLock l(lock); + if (connection); + { + sessionCore.reset(); + connection.reset(); + } + } + stop(); +} + void Channel::start(){ running = true; dispatcher = Thread(*this); |