lo.set_fixed_cpu(ss.cpu);
ss.listener = seastar::listen(s_addr, lo);
}).then([] {
- return true;
- }).handle_exception_type([addr] (const std::system_error& e) {
+ return listen_ertr::now();
+ }).handle_exception_type(
+ [addr] (const std::system_error& e) -> listen_ertr::future<> {
if (e.code() == std::errc::address_in_use) {
logger().trace("FixedCPUServerSocket::listen({}): address in use", addr);
- } else {
- logger().error("FixedCPUServerSocket::listen({}): "
- "got unexpeted error {}", addr, e);
- ceph_abort();
- }
- return false;
- }).then([] (bool success) -> listen_ertr::future<> {
- if (success) {
- return listen_ertr::now();
- } else {
return crimson::ct_error::address_in_use::make();
}
+ logger().error("FixedCPUServerSocket::listen({}): "
+ "got unexpeted error {}", addr, e);
+ ceph_abort();
});
}