mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd: Various exception assertions; minor cleanup.
This commit is contained in:
parent
a48426e25d
commit
3810b8d57f
4 changed files with 20 additions and 12 deletions
|
@ -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<socket>);
|
||||
|
|
|
@ -30,7 +30,7 @@ struct ircd::ctx::pool
|
|||
std::vector<context> ctxs;
|
||||
|
||||
void next();
|
||||
void main();
|
||||
void main() noexcept;
|
||||
|
||||
public:
|
||||
// indicators
|
||||
|
|
|
@ -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
|
||||
|
|
16
ircd/ctx.cc
16
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",
|
||||
log::debug
|
||||
{
|
||||
"pool(%p) ctx(%p): %s",
|
||||
this,
|
||||
&cur(),
|
||||
e.what());
|
||||
e.what()
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
||||
|
@ -773,10 +776,13 @@ catch(const interrupted &e)
|
|||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::critical("pool(%p) ctx(%p): unhandled: %s",
|
||||
log::critical
|
||||
{
|
||||
"pool(%p) ctx(%p): unhandled: %s",
|
||||
this,
|
||||
&cur(),
|
||||
e.what());
|
||||
e.what()
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue