qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r561279 - /incubator/qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
Date Tue, 31 Jul 2007 09:09:20 GMT
Author: astitcher
Date: Tue Jul 31 02:09:19 2007
New Revision: 561279

URL: http://svn.apache.org/viewvc?view=rev&rev=561279
Log:
* Fix crash on shutdown due to underlying poller being shutdown twice
- Actually just made the poller ignore subsequent shutdown attempts

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

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp?view=diff&rev=561279&r1=561278&r2=561279
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp Tue Jul 31 02:09:19 2007
@@ -239,6 +239,10 @@
 }
 
 void Poller::shutdown() {
+	// Allow sloppy code to shut us down more than once
+	if (impl->isShutdown)
+		return;
+
     // Don't use any locking here - isshutdown will be visible to all
     // after the epoll_ctl() anyway (it's a memory barrier)
     impl->isShutdown = true;



Mime
View raw message