changeset 390:1471c6fb108a

nginx-0.0.7-2004-07-14-00:24:56 import
author Igor Sysoev <igor@sysoev.ru>
date Tue, 13 Jul 2004 20:24:56 +0000
parents 537de4dca8ca
children b670db10cbbd
files src/event/modules/ngx_rtsig_module.c
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/modules/ngx_rtsig_module.c
+++ b/src/event/modules/ngx_rtsig_module.c
@@ -643,7 +643,11 @@ static ngx_int_t ngx_rtsig_process_overf
 
             rev = c->read;
 
-            if (overflow_list[i].revents & (POLLIN|POLLERR|POLLHUP|POLLNVAL)) {
+            if (rev->active
+                && rev->event_handler
+                && (overflow_list[i].revents
+                                          & (POLLIN|POLLERR|POLLHUP|POLLNVAL)))
+            {
                 tested++;
 
                 if (ngx_threaded) {
@@ -658,7 +662,11 @@ static ngx_int_t ngx_rtsig_process_overf
 
             wev = c->write;
 
-            if (overflow_list[i].revents & (POLLOUT|POLLERR|POLLHUP|POLLNVAL)) {
+            if (wev->active
+                && wev->event_handler
+                && (overflow_list[i].revents
+                                         & (POLLOUT|POLLERR|POLLHUP|POLLNVAL)))
+            {
                 tested++;
 
                 if (ngx_threaded) {