From 35164c501722f07beef21178b19090fa9d1930cd Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 12 Dec 2008 17:48:03 +0100 Subject: rx_hook may be cleaned in some callback so we check it before executing sk_read(). --- sysdep/unix/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdep') diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 5aed1b22..b6c7f846 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 { -- cgit v1.2.3