rx_hook may be cleaned in some callback so we check it before
executing sk_read().
This commit is contained in:
parent
d6a836f8d6
commit
35164c5017
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue