diff options
| author | Gordon Sim <gsim@apache.org> | 2007-07-05 09:47:07 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2007-07-05 09:47:07 +0000 |
| commit | 07c8c499649c725a226eeda3e0bfe58fa8ba984c (patch) | |
| tree | 0f71fc80b9e6e9929184334f4dc7d8fc03f7ccc0 /cpp/src/qpid/broker/BrokerChannel.cpp | |
| parent | d4be469092c558ca9031d82b963b8b845fa1e1bd (diff) | |
| download | qpid-python-07c8c499649c725a226eeda3e0bfe58fa8ba984c.tar.gz | |
Fix for QPID-534. Get now detects closure correctly. Also fixed broker to allow channel.close-ok (and fixed client to send it).
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553441 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/BrokerChannel.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/BrokerChannel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/BrokerChannel.cpp b/cpp/src/qpid/broker/BrokerChannel.cpp index 86768f0d88..3d9eab4433 100644 --- a/cpp/src/qpid/broker/BrokerChannel.cpp +++ b/cpp/src/qpid/broker/BrokerChannel.cpp @@ -401,9 +401,11 @@ void Channel::handleMethodInContext( { try{ if(getId() != 0 && !method->isA<ChannelOpenBody>() && !isOpen()) { - std::stringstream out; - out << "Attempt to use unopened channel: " << getId(); - throw ConnectionException(504, out.str()); + if (!method->isA<ChannelCloseOkBody>()) { + std::stringstream out; + out << "Attempt to use unopened channel: " << getId(); + throw ConnectionException(504, out.str()); + } } else { method->invoke(*adapter, context); } |
