Open
Description
Same question about seastar::sharded etc.
I have seastar::connected_socket.
It requires, that its .close must be called AND awaited before destructor. I dont see how it may work with RAII, i run into endless asserions in socket destructor / memory leaks on program end when in destructor i start future with "correct" socket destruction and move socket into it
Also, i dont see any example how to close seastar socket correctly. Is this code correctly closes seastar::connected_socket ?
seastar::future<> close_socket(socket_its_input_and_its_output impl) {
try {
co_await impl->input.close();
while (!impl->input.eof()) {
co_await impl->input.read();
}
co_await impl->output.close();
impl->sock.shutdown_input();
impl->sock.shutdown_output();
co_await impl->sock.wait_input_shutdown();
catch(...) {
}
}
Metadata
Metadata
Assignees
Labels
No labels