summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysdep/unix/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 5aed1b2..b6c7f84 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -1372,14 +1372,14 @@ io_loop(void)
{
sock *s = current_sock;
int e;
- if (FD_ISSET(s->fd, &rd))
+ if (FD_ISSET(s->fd, &rd) && s->rx_hook)
do
{
e = sk_read(s);
if (s != current_sock)
goto next;
}
- while (e);
+ while (e && s->rx_hook);
if (FD_ISSET(s->fd, &wr))
do
{