summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-11-13 22:11:44 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-11-13 22:11:44 +0000
commit1476f5d09232ffcbf99ca91e3ed0737e3c55944b (patch)
tree4abd4007443327f5a4a038a148ebfb960ec15a8e /qpid/cpp
parent67ffcc19fb2e0e5f2afdac8686822b62a7c2ed1c (diff)
downloadqpid-python-1476f5d09232ffcbf99ca91e3ed0737e3c55944b.tar.gz
QPID-4435: Reconnect on connect failure hangs at third address to try
- In the case of retrying a connection failure the epoll code mistakenly thinks the connection has just been disconnected and therefore should never be seen again. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1408983 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rw-r--r--qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp b/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
index 3769a11f7d..6fdf99637f 100644
--- a/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
+++ b/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
@@ -384,6 +384,7 @@ void PollerPrivate::resetMode(PollerHandlePrivate& eh) {
int rc = ::epoll_ctl(epollFd, EPOLL_CTL_MOD, eh.fd(), &epe);
// If something has closed the fd in the meantime try adding it back
if (rc ==-1 && errno == ENOENT) {
+ eh.setIdle(); // Reset our handle as if starting from scratch
rc = ::epoll_ctl(epollFd, EPOLL_CTL_ADD, eh.fd(), &epe);
}
QPID_POSIX_CHECK(rc);