You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2009/08/11 07:35:05 UTC

svn commit: r802991 - /qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp

Author: astitcher
Date: Tue Aug 11 05:35:05 2009
New Revision: 802991

URL: http://svn.apache.org/viewvc?rev=802991&view=rev
Log:
Ensure that a PollerHandle that has had a disconnected event can never
be returned with any more events

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp?rev=802991&r1=802990&r2=802991&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp Tue Aug 11 05:35:05 2009
@@ -575,8 +575,11 @@
                 // (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();



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org