diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-08-20 04:49:21 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-20 04:49:21 +0500 |
| commit | 8ac0bd28f616d04c517653c79e6fdab74712fe61 (patch) | |
| tree | cece905da69396f547ead8e88530327c626a9545 | |
| parent | 9683efb2adee597304151299e5f55e6ab693605a (diff) | |
| download | nng-8ac0bd28f616d04c517653c79e6fdab74712fe61.tar.gz nng-8ac0bd28f616d04c517653c79e6fdab74712fe61.tar.bz2 nng-8ac0bd28f616d04c517653c79e6fdab74712fe61.zip | |
fixes #653 Weird connect failures in dialer (multistress) (#660)
The POLLHUP (or rather EPOLLHUP) flag does not quite mean the same
thing in Linux, and we've seen random failures where we will sometimes
get this event on a socket that is freshly connected. This might be
a bug in Linux, but it is easy enough to workaround -- we just don't
watch for it at all.
| -rw-r--r-- | src/platform/posix/posix_pollq_epoll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platform/posix/posix_pollq_epoll.c b/src/platform/posix/posix_pollq_epoll.c index e4f9ddb6..92c03120 100644 --- a/src/platform/posix/posix_pollq_epoll.c +++ b/src/platform/posix/posix_pollq_epoll.c @@ -35,7 +35,7 @@ typedef struct nni_posix_pollq nni_posix_pollq; #define NNI_MAX_EPOLL_EVENTS 64 // flags we always want enabled as long as at least one event is active -#define NNI_EPOLL_FLAGS (EPOLLONESHOT | EPOLLERR | EPOLLHUP) +#define NNI_EPOLL_FLAGS (EPOLLONESHOT | EPOLLERR) // Locking strategy: // @@ -271,7 +271,7 @@ nni_posix_poll_thr(void *arg) int events; events = ev->events & - (EPOLLIN | EPOLLOUT | EPOLLERR | EPOLLHUP); + (EPOLLIN | EPOLLOUT | EPOLLERR); nni_mtx_lock(&pfd->mtx); pfd->events &= ~events; |
