Skip to content
Snippets Groups Projects
Commit 9eeddee7 authored by Simion George's avatar Simion George
Browse files

NOW

parent 3cf7af35
No related branches found
No related tags found
No related merge requests found
Pipeline #102329 passed
......@@ -140,7 +140,13 @@ void connection_start_async_io(struct connection *conn)
/* AIO notify us when done */
io_set_eventfd(&conn->iocb, conn->eventfd);
io_submit(conn->ctx, 1, conn->piocb);
int ret = io_submit(conn->ctx, 1, conn->piocb);
if (ret < 0) {
connection_remove(conn);
return;
}
conn->state = STATE_ASYNC_ONGOING;
}
......@@ -494,12 +500,12 @@ void handle_output(struct connection *conn)
} else if (ret == 0) {
/* done */
if (conn->file_pos < conn->file_size)
connection_start_async_io(conn);
else
connection_remove(conn);
connection_remove(conn);
} else {
if (conn->state == STATE_ASYNC_ONGOING)
return;
w_epoll_update_ptr_out(epollfd, conn->sockfd, conn);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment