rx_hook may be cleaned in some callback so we check it before

executing sk_read().
This commit is contained in:
Ondrej Zajicek 2008-12-12 17:48:03 +01:00
parent d6a836f8d6
commit 35164c5017

View file

@ -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
{