summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_kqueue_engine.c
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
committerKonstantin Pavlov <thresh@nginx.com>2023-05-10 10:29:16 -0700
commit69235c513277c64b513447d9b92c3c03d616f577 (patch)
tree0780c92ba28d92b547c85ea0bee5e3040e14dee2 /src/nxt_kqueue_engine.c
parentb9bc222021e77bbdfb12576b3e315b962cf6b399 (diff)
parentfaf97dc06058de1c929af33a68adb34d3932b374 (diff)
downloadunit-69235c513277c64b513447d9b92c3c03d616f577.tar.gz
unit-69235c513277c64b513447d9b92c3c03d616f577.tar.bz2
Merged with the default branch.1.30.0-1
Diffstat (limited to 'src/nxt_kqueue_engine.c')
-rw-r--r--src/nxt_kqueue_engine.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nxt_kqueue_engine.c b/src/nxt_kqueue_engine.c
index ecc3251e..a7a5a29e 100644
--- a/src/nxt_kqueue_engine.c
+++ b/src/nxt_kqueue_engine.c
@@ -716,6 +716,8 @@ nxt_kqueue_poll(nxt_event_engine_t *engine, nxt_msec_t timeout)
for (i = 0; i < nevents; i++) {
+ error = 0;
+
kev = &engine->u.kqueue.events[i];
nxt_debug(&engine->task,
@@ -725,12 +727,11 @@ nxt_kqueue_poll(nxt_event_engine_t *engine, nxt_msec_t timeout)
kev->ident, kev->filter, kev->flags, kev->fflags,
kev->data, kev->udata);
- error = (kev->flags & EV_ERROR);
-
- if (nxt_slow_path(error)) {
+ if (nxt_slow_path(kev->flags & EV_ERROR)) {
nxt_alert(&engine->task,
"kevent(%d) error %E on ident:%d filter:%d",
engine->u.kqueue.fd, kev->data, kev->ident, kev->filter);
+ error = 1;
}
task = &engine->task;