diff --git a/include/ircd/client.h b/include/ircd/client.h index aa0e548ec..ac27ce5a0 100644 --- a/include/ircd/client.h +++ b/include/ircd/client.h @@ -62,7 +62,7 @@ struct ircd::client bool resource_request(const http::request::head &); bool handle_request(parse::capstan &pc); bool main() noexcept; - void async(); + bool async(); public: client(std::shared_ptr); diff --git a/include/ircd/ctx/pool.h b/include/ircd/ctx/pool.h index 09dd0587f..816f98e39 100644 --- a/include/ircd/ctx/pool.h +++ b/include/ircd/ctx/pool.h @@ -30,7 +30,7 @@ struct ircd::ctx::pool std::vector ctxs; void next(); - void main(); + void main() noexcept; public: // indicators diff --git a/ircd/client.cc b/ircd/client.cc index 0885f6976..0f327dc6b 100644 --- a/ircd/client.cc +++ b/ircd/client.cc @@ -267,9 +267,10 @@ namespace ircd /// /// This call returns immediately so we no longer block the current context and /// its stack while waiting for activity on idle connections between requests. -void +bool ircd::client::async() { + const unwind::nominal::assertion na; assert(bool(this->sock)); assert(bool(this->conf)); auto &sock(*this->sock); @@ -289,6 +290,7 @@ ircd::client::async() }; sock(opts, std::move(handler)); + return true; } /// The client's socket is ready for reading. This intermediate handler diff --git a/ircd/ctx.cc b/ircd/ctx.cc index e15f5f2df..ad400f385 100644 --- a/ircd/ctx.cc +++ b/ircd/ctx.cc @@ -727,7 +727,7 @@ ircd::ctx::pool::interrupt() void ircd::ctx::pool::main() -try +noexcept try { ++running; const unwind avail([this] @@ -741,10 +741,13 @@ try catch(const interrupted &e) { /* - log::debug("pool(%p) ctx(%p): %s", - this, - &cur(), - e.what()); + log::debug + { + "pool(%p) ctx(%p): %s", + this, + &cur(), + e.what() + }; */ } @@ -773,10 +776,13 @@ catch(const interrupted &e) } catch(const std::exception &e) { - log::critical("pool(%p) ctx(%p): unhandled: %s", - this, - &cur(), - e.what()); + log::critical + { + "pool(%p) ctx(%p): unhandled: %s", + this, + &cur(), + e.what() + }; } void