summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-08-11 05:34:59 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-08-11 05:34:59 +0000
commit04ab2e970ea5e1c1ace127bec7212cf665dd9b80 (patch)
treef599d1d3fcf786ea32ac626063aedc519b293e07 /cpp/src
parent9a0521e5562ba6bf5c3468eb171c109e166cfa5d (diff)
downloadqpid-python-04ab2e970ea5e1c1ace127bec7212cf665dd9b80.tar.gz
Fix for re-entering DispatchHandle::processEvent more than once on disconnection
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@802990 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/sys/DispatchHandle.cpp5
-rw-r--r--cpp/src/qpid/sys/epoll/EpollPoller.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/qpid/sys/DispatchHandle.cpp b/cpp/src/qpid/sys/DispatchHandle.cpp
index d65cd8a427..605edabc64 100644
--- a/cpp/src/qpid/sys/DispatchHandle.cpp
+++ b/cpp/src/qpid/sys/DispatchHandle.cpp
@@ -284,10 +284,7 @@ void DispatchHandle::processEvent(Poller::EventType type) {
readableCallback(*this);
writableCallback(*this);
break;
- case Poller::DISCONNECTED: {
- ScopedLock<Mutex> lock(stateLock);
- poller->unmonitorHandle(*this, Poller::INOUT);
- }
+ case Poller::DISCONNECTED:
if (disconnectedCallback) {
disconnectedCallback(*this);
}
diff --git a/cpp/src/qpid/sys/epoll/EpollPoller.cpp b/cpp/src/qpid/sys/epoll/EpollPoller.cpp
index 5a6b8987ec..09f3f8edc7 100644
--- a/cpp/src/qpid/sys/epoll/EpollPoller.cpp
+++ b/cpp/src/qpid/sys/epoll/EpollPoller.cpp
@@ -575,6 +575,8 @@ Poller::Event Poller::wait(Duration timeout) {
// (just not writable), allow us to readable until we get here again
if (epe.events & ::EPOLLHUP) {
if (eh.isHungup()) {
+ // Don't set up last Handle so that we don't reset this handle
+ // when we get back in here
return Event(handle, DISCONNECTED);
}
eh.setHungup();