diff options
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); |