mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
transport: ignore errors during connection shutdown
If the other end of the connection has already disconnected the shutdown will fail with ENOTCONN. The resulting exception is going to propagate through the continuation chain that is supposed to shut the cql server down preventing it from properly waiting for all outstanding continuations. The solution is to just ignore any errors that shutdown() may return. Signed-off-by: Paweł Dziepak <pdziepak@scylladb.com>
This commit is contained in:
@@ -544,9 +544,12 @@ future<> cql_server::connection::process()
|
||||
|
||||
future<> cql_server::connection::shutdown()
|
||||
{
|
||||
return _fd.shutdown_input().then([this] {
|
||||
return make_ready_future<>().then([this] {
|
||||
return _fd.shutdown_input();
|
||||
}).then_wrapped([this] (auto&& f) {
|
||||
f.ignore_ready_future();
|
||||
return _fd.shutdown_output();
|
||||
});
|
||||
}).handle_exception([] (auto) {});
|
||||
}
|
||||
|
||||
future<> cql_server::connection::process_request() {
|
||||
|
||||
Reference in New Issue
Block a user