From: Kefu Chai Date: Tue, 13 Jul 2021 11:42:19 +0000 (+0800) Subject: crimson/tools/store_nbd: handle ECONNABORTED returned by accept() X-Git-Tag: v17.1.0~1426^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42303%2Fhead;p=ceph.git 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 --- diff --git a/src/crimson/tools/store_nbd/store-nbd.cc b/src/crimson/tools/store_nbd/store-nbd.cc index e1ff3899db8..5419c5565e1 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&) {});