aboutsummaryrefslogtreecommitdiff
path: root/aio-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'aio-posix.c')
-rw-r--r--aio-posix.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/aio-posix.c b/aio-posix.c
index 43162a9f29..4ef34dd175 100644
--- a/aio-posix.c
+++ b/aio-posix.c
@@ -431,11 +431,13 @@ bool aio_poll(AioContext *ctx, bool blocking)
assert(npfd == 0);
/* fill pollfds */
- QLIST_FOREACH(node, &ctx->aio_handlers, node) {
- if (!node->deleted && node->pfd.events
- && !aio_epoll_enabled(ctx)
- && aio_node_check(ctx, node->is_external)) {
- add_pollfd(node);
+
+ if (!aio_epoll_enabled(ctx)) {
+ QLIST_FOREACH(node, &ctx->aio_handlers, node) {
+ if (!node->deleted && node->pfd.events
+ && aio_node_check(ctx, node->is_external)) {
+ add_pollfd(node);
+ }
}
}