diff --git a/src/resolv.c b/src/resolv.c index 1785f766..c2778ff5 100644 --- a/src/resolv.c +++ b/src/resolv.c @@ -460,12 +460,9 @@ static void resolv_sock_state_cb(void *data, int s, int read, int write) { struct resolv_ctx *ctx = (struct resolv_ctx *)data; - int io_active = ev_is_active(&ctx->io); if (read || write) { - if (io_active && ctx->io.fd != s) { - ev_io_stop(default_loop, &ctx->io); - } + ev_io_stop(default_loop, &ctx->io); ev_io_set(&ctx->io, s, (read ? EV_READ : 0) | (write ? EV_WRITE : 0)); ev_io_start(default_loop, &ctx->io); } else {