Klaus Demo nginx / 57ca2c8
test event type to prevent errors Igor Sysoev 13 years ago
1 changed file(s) with 10 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
146146 return NGX_OK;
147147 }
148148
149 if ((event == NGX_READ_EVENT && ev->write)
150 || (event == NGX_WRITE_EVENT && !ev->write))
151 {
152 ngx_log_error(NGX_LOG_ALERT, ev->log, 0,
153 "invalid select %s event fd:%d ev:%i",
154 ev->write ? "write" : "read", c->fd, event);
155 return NGX_ERROR;
156 }
157
158
149159 #if (NGX_WIN32)
150160
151161 if ((event == NGX_READ_EVENT) && (max_read >= FD_SETSIZE)