aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-08-30 14:15:56 -0700
committerGarrett D'Amore <garrett@damore.org>2018-08-30 15:28:43 -0700
commitc96b7665469679563ee642a42d175aa24a957f26 (patch)
treefe2de97bc1bc27247f63a0a9aefe3b1950458d9c /src/platform/posix
parent629002efac8085a9c6321a15b43a47a43ca0e084 (diff)
downloadnng-c96b7665469679563ee642a42d175aa24a957f26.tar.gz
nng-c96b7665469679563ee642a42d175aa24a957f26.tar.bz2
nng-c96b7665469679563ee642a42d175aa24a957f26.zip
fixes #687 POLLHUP is problematic on macOS too...
Basically, we can ignore EV_EOF, as we wind up still alerting the corresponding events. EV_ERROR we still treat as HUP. (The EV_EOF was responsible for prematurely closing the socket and aborting transactions while there was still data in the socket buffers.)
Diffstat (limited to 'src/platform/posix')
-rw-r--r--src/platform/posix/posix_pollq_kqueue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/posix/posix_pollq_kqueue.c b/src/platform/posix/posix_pollq_kqueue.c
index 50874d14..1aef2a93 100644
--- a/src/platform/posix/posix_pollq_kqueue.c
+++ b/src/platform/posix/posix_pollq_kqueue.c
@@ -252,7 +252,7 @@ nni_posix_poll_thr(void *arg)
continue;
}
pf = (void *) ev->udata;
- if (ev->flags & (EV_ERROR | EV_EOF)) {
+ if (ev->flags & EV_ERROR) {
revents |= POLLHUP;
}