comparison src/event/ngx_event.c @ 7788:9ca8fb98ef1c

Events: fixed eventport handling in ngx_handle_read_event(). The "!rev->ready" test seems to be a typo, introduced in the original commit (719:f30b1a75fd3b). The ngx_handle_write_event() code properly tests for "rev->ready" instead. Due to this typo, read events might be unexpectedly removed during proxying after an event on the other part of the proxied connection. Catched by mail proxying tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 05 Mar 2021 17:16:15 +0300
parents f1720934c45b
children 2ed5d03c2d90 05e0988a6898
comparison
equal deleted inserted replaced
7787:7ce28b4cc57e 7788:9ca8fb98ef1c
316 } 316 }
317 317
318 return NGX_OK; 318 return NGX_OK;
319 } 319 }
320 320
321 if (rev->oneshot && !rev->ready) { 321 if (rev->oneshot && rev->ready) {
322 if (ngx_del_event(rev, NGX_READ_EVENT, 0) == NGX_ERROR) { 322 if (ngx_del_event(rev, NGX_READ_EVENT, 0) == NGX_ERROR) {
323 return NGX_ERROR; 323 return NGX_ERROR;
324 } 324 }
325 325
326 return NGX_OK; 326 return NGX_OK;