Sorry for bothering you.
I think I've made it clear.
Because there's another function ngx_epoll_add_connection which add an
event combined with EPOLLIN & EPOLLOUT. If using ngx_epoll_del_event on
this kind of event it cannot just use EPOLL_CTL_DEL, in which way both the
read and write will be delete. That's why the EPOLL_CTL_MOD was used here.
There's another piece of code in the ignored parts of the code I previously
quoted. Which means when deleting a read event, set it to write event and
modify it, while when deleting a write event, set it to read event and
modify it.
if (event == NGX_READ_EVENT) {
e = c->write;
prev = EPOLLOUT;
} else {
e = c->read;
prev = EPOLLIN|EPOLLRDHUP;
}
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel