diff options
author | Alan Conway <aconway@apache.org> | 2012-02-17 14:17:22 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2012-02-17 14:17:22 +0000 |
commit | 08b6a333524ecf56c27ff337967d7328451af791 (patch) | |
tree | 71df87b78afb6cac57dac041cfa91da8a4d2a89f | |
parent | c203071366928116c7bb1609091957d1526330e6 (diff) | |
download | qpid-python-08b6a333524ecf56c27ff337967d7328451af791.tar.gz |
QPID-3603: Removed incorrect asserts from Link.cpp
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603-7@1245556 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/src/qpid/broker/Link.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/Link.cpp b/qpid/cpp/src/qpid/broker/Link.cpp index e3b2b1f29c..997deabfaa 100644 --- a/qpid/cpp/src/qpid/broker/Link.cpp +++ b/qpid/cpp/src/qpid/broker/Link.cpp @@ -106,8 +106,9 @@ Link::Link(LinkRegistry* _links, Link::~Link () { - assert(state == STATE_CLOSED); // Can only get here after destroy() - assert(connection == 0); + if (state == STATE_OPERATIONAL && connection != 0) + connection->close(CLOSE_CODE_CONNECTION_FORCED, "closed by management"); + if (mgmtObject != 0) mgmtObject->resourceDestroy (); } @@ -162,7 +163,6 @@ void Link::established(Connection* c) agent->raiseEvent(_qmf::EventBrokerLinkUp(addr.str())); Mutex::ScopedLock mutex(lock); - assert(state == STATE_CONNECTING); setStateLH(STATE_OPERATIONAL); currentInterval = 1; visitCount = 0; |