summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
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();