diff --git a/include/ircd/net/socket.h b/include/ircd/net/socket.h index 23f28282d..39e1939ef 100644 --- a/include/ircd/net/socket.h +++ b/include/ircd/net/socket.h @@ -100,7 +100,6 @@ struct ircd::net::socket // low level check suite error_code check(std::nothrow_t, const ready &) noexcept; - void check(const ready &); // low level wait suite void wait(const wait_opts &); diff --git a/ircd/net.cc b/ircd/net.cc index dcc241854..173f3b2c5 100644 --- a/ircd/net.cc +++ b/ircd/net.cc @@ -471,7 +471,16 @@ void ircd::net::check(socket &socket, const ready &type) { - socket.check(type); + const error_code ec + { + check(std::nothrow, socket, type) + }; + + if(likely(!ec)) + return; + + throw_system_error(ec); + __builtin_unreachable(); } std::error_code @@ -3142,18 +3151,6 @@ catch(const boost::system::system_error &e) throw_system_error(e); } -void -ircd::net::socket::check(const ready &type) -{ - const error_code ec - { - check(std::nothrow, type) - }; - - if(ec.value()) - throw_system_error(ec); -} - std::error_code ircd::net::socket::check(std::nothrow_t, const ready &type)