unittest_seastar_messenger is failed since updated the seastar repo.
std::system_error (error system:22, Invalid argument) will be raised
from `listener->accept()`, which will be re-raised and not be captured.
This fix is to print error logs for the unexpected exceptions in
`SocketMessenger::start()` and not raise them again.
Signed-off-by: Yingxin Cheng <yingxincheng@gmail.com>
using namespace ceph::net;
+namespace {
+ seastar::logger& logger() {
+ return ceph::get_logger(ceph_subsys_ms);
+ }
+}
+
SocketMessenger::SocketMessenger(const entity_name_t& myname,
const std::string& logic_name,
uint32_t nonce)
}).handle_exception_type([this] (const std::system_error& e) {
// stop gracefully on connection_aborted
if (e.code() != error::connection_aborted) {
- throw e;
+ logger().error("{} unexpected error during accept: {}", *this, e);
}
});
}