diff --git a/src/server.c b/src/server.c index be7db43f..4aa2a237 100644 --- a/src/server.c +++ b/src/server.c @@ -903,6 +903,8 @@ server_recv_cb(EV_P_ ev_io *w, int revents) ev_io_start(EV_A_ & remote->send_ctx->io); } } else { + ev_io_stop(EV_A_ & server_recv_ctx->io); + query_t *query = ss_malloc(sizeof(query_t)); memset(query, 0, sizeof(query_t)); query->server = server; @@ -920,8 +922,6 @@ server_recv_cb(EV_P_ ev_io *w, int revents) close_and_free_server(EV_A_ server); return; } - - ev_io_stop(EV_A_ & server_recv_ctx->io); } return;