From e8acc51c20c666cb8141e754433e0fa83f4b234e Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 11 Aug 2009 05:35:05 +0000 Subject: Ensure that a PollerHandle that has had a disconnected event can never be returned with any more events git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@802991 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/epoll/EpollPoller.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cpp/src') diff --git a/cpp/src/qpid/sys/epoll/EpollPoller.cpp b/cpp/src/qpid/sys/epoll/EpollPoller.cpp index 09f3f8edc7..9fd0602ce9 100644 --- a/cpp/src/qpid/sys/epoll/EpollPoller.cpp +++ b/cpp/src/qpid/sys/epoll/EpollPoller.cpp @@ -575,8 +575,11 @@ 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()) { + eh.setInactive(); // Don't set up last Handle so that we don't reset this handle - // when we get back in here + // on re-entering Poller::wait. This means that we will never + // be set active again once we've returned disconnected, and so + // can never be returned again. return Event(handle, DISCONNECTED); } eh.setHungup(); -- cgit v1.2.1