co-uring-WebServer icon indicating copy to clipboard operation
co-uring-WebServer copied to clipboard

`io_uring_handler::add_close_request` is not actually executed

Open mansicer opened this issue 3 years ago • 0 comments

The implementation of close_awaitable::await_ready in stream.h directly return true, leading to a skip of await_suspend. As a result, promise.uring->add_close_request(fd) is never executed after writing the buffer and data in std::map<int, task> connections will not be erased. The established connections will be maintained til the program exits. A possible approach may be to return false for close_awaitable::await_ready and moreover perform h.resume() after closing the connection to make the task coroutine end.

mansicer avatar Jun 15 '22 04:06 mansicer