summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/io-loop.c2
-rw-r--r--sysdep/unix/io.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/io-loop.c b/sysdep/unix/io-loop.c
index 275d38a0..c7cf4ad2 100644
--- a/sysdep/unix/io-loop.c
+++ b/sysdep/unix/io-loop.c
@@ -205,7 +205,7 @@ sk_stop(sock *s)
}
static inline uint sk_want_events(sock *s)
-{ return (s->rx_hook ? POLLIN : 0) | ((s->ttx != s->tpos) ? POLLOUT : 0); }
+{ return ((s->rx_hook && !ev_corked(s->cork)) ? POLLIN : 0) | ((s->ttx != s->tpos) ? POLLOUT : 0); }
/*
FIXME: this should be called from sock code
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index c91f2856..dd385c80 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -2234,7 +2234,7 @@ io_loop(void)
{
pfd[nfds] = (struct pollfd) { .fd = -1 }; /* everything other set to 0 by this */
s = SKIP_BACK(sock, n, n);
- if (s->rx_hook)
+ if (s->rx_hook && !ev_corked(s->cork))
{
pfd[nfds].fd = s->fd;
pfd[nfds].events |= POLLIN;