diff options
| author | Ted Ross <tross@apache.org> | 2011-09-16 14:34:39 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2011-09-16 14:34:39 +0000 |
| commit | ab66e50da3f39257590b941ab1fabd709e298c8f (patch) | |
| tree | 5fda155ed9c6fe2d3fed8681de577501dcd5921f /qpid/cpp/src/qmf/AgentSession.cpp | |
| parent | 0f4893206428cea8b6b9af46ed2fdacc7b7d834f (diff) | |
| download | qpid-python-ab66e50da3f39257590b941ab1fabd709e298c8f.tar.gz | |
QPID-3484 - Added missing constructor for EventNotifier, fixed initialization bug.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1171592 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/AgentSession.cpp')
| -rw-r--r-- | qpid/cpp/src/qmf/AgentSession.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/qpid/cpp/src/qmf/AgentSession.cpp b/qpid/cpp/src/qmf/AgentSession.cpp index d92b2a41d3..251c25fd44 100644 --- a/qpid/cpp/src/qmf/AgentSession.cpp +++ b/qpid/cpp/src/qmf/AgentSession.cpp @@ -55,7 +55,7 @@ void AgentSession::raiseEvent(const Data& d, int s) { impl->raiseEvent(d, s); } //======================================================================================== AgentSessionImpl::AgentSessionImpl(Connection& c, const string& options) : - connection(c), domain("default"), opened(false), thread(0), threadCanceled(false), + connection(c), domain("default"), opened(false), eventNotifier(0), thread(0), threadCanceled(false), bootSequence(1), interval(60), lastHeartbeat(0), lastVisit(0), forceHeartbeat(false), externalStorage(false), autoAllowQueries(true), autoAllowMethods(true), maxSubscriptions(64), minSubInterval(3000), subLifetime(300), publicEvents(true), @@ -191,7 +191,7 @@ void AgentSessionImpl::open() } -void AgentSessionImpl::close() +void AgentSessionImpl::closeAsync() { if (!opened) return; @@ -202,6 +202,18 @@ void AgentSessionImpl::close() } +void AgentSessionImpl::close() +{ + closeAsync(); + + if (thread) { + thread->join(); + delete thread; + thread = 0; + } +} + + bool AgentSessionImpl::nextEvent(AgentEvent& event, Duration timeout) { uint64_t milliseconds = timeout.getMilliseconds(); |
