commit | 0a280a3fc081877bc45cbdc0511a8cc42675213c | [log] [tgz] |
---|---|---|
author | Igor Sysoev <igor@sysoev.ru> | Sun Oct 12 16:49:16 2003 +0000 |
committer | Igor Sysoev <igor@sysoev.ru> | Sun Oct 12 16:49:16 2003 +0000 |
tree | b5ea17e3be5eab555cf40f6304338a88bd641527 | |
parent | b3e73d869ecef9248468e0ccc2d7d0abdbee495c [diff] [blame] |
nginx-0.0.1-2003-10-12-20:49:16 import
diff --git a/src/os/unix/ngx_recv.c b/src/os/unix/ngx_recv.c index 1545654..cef4328 100644 --- a/src/os/unix/ngx_recv.c +++ b/src/os/unix/ngx_recv.c
@@ -43,8 +43,11 @@ if (n >= 0) { if (ngx_event_flags & NGX_HAVE_KQUEUE_EVENT) { rev->available -= n; - if (rev->available == 0) { + if (rev->available <= 0) { rev->ready = 0; + if (rev->available < 0) { + rev->available = 0; + } } return n;