From 92b02120e426283694cef185320768b14bbf8c01 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 13 Jul 2021 19:42:19 +0800 Subject: [PATCH] crimson/tools/store_nbd: handle ECONNABORTED returned by accept() if we abort accept() call, an ECONNABORTED is expected. and we should handle it, otherwise unhandled exception will be noticed by seastar's reactor. and it complains in that case. Signed-off-by: Kefu Chai --- src/crimson/tools/store_nbd/store-nbd.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/crimson/tools/store_nbd/store-nbd.cc b/src/crimson/tools/store_nbd/store-nbd.cc index e1ff3899db8f..5419c5565e10 100644 --- a/src/crimson/tools/store_nbd/store-nbd.cc +++ b/src/crimson/tools/store_nbd/store-nbd.cc @@ -426,6 +426,11 @@ void NBDHandler::run() logger().error("NBDHandler::run saw exception {}", e); }); }); + }).handle_exception_type([] (const std::system_error &e) { + // an ECONNABORTED is expected when we are being stopped. + if (e.code() != std::errc::connection_aborted) { + logger().error("accept failed: {}", e); + } }); }); }).handle_exception_type([](const seastar::gate_closed_exception&) {}); -- 2.47.3