mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
ircd::client: Adjust main exception handlers for ctx::terminated.
This commit is contained in:
parent
e90603b762
commit
2183c6bea9
1 changed files with 22 additions and 17 deletions
|
@ -399,14 +399,14 @@ noexcept try
|
|||
else
|
||||
client->close(net::dc::SSL_NOTIFY).wait();
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
catch(...)
|
||||
{
|
||||
log::derror
|
||||
{
|
||||
"socket(%p) client(%p) (below main): %s",
|
||||
"socket(%p) client(%p) (below main) :%s",
|
||||
client->sock.get(),
|
||||
client.get(),
|
||||
e.what()
|
||||
what(std::current_exception())
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -625,20 +625,6 @@ noexcept try
|
|||
|
||||
return true;
|
||||
}
|
||||
catch(const ctx::interrupted &e)
|
||||
{
|
||||
log::warning
|
||||
{
|
||||
"socket(%p) local[%s] remote[%s] Request interrupted: %s",
|
||||
sock.get(),
|
||||
string(local(*this)),
|
||||
string(remote(*this)),
|
||||
e.what()
|
||||
};
|
||||
|
||||
close(net::dc::RST, net::close_ignore);
|
||||
return false;
|
||||
}
|
||||
catch(const boost::system::system_error &e)
|
||||
{
|
||||
using namespace boost::system::errc;
|
||||
|
@ -713,6 +699,20 @@ catch(const boost::system::system_error &e)
|
|||
close(net::dc::RST, net::close_ignore);
|
||||
return false;
|
||||
}
|
||||
catch(const ctx::interrupted &e)
|
||||
{
|
||||
log::warning
|
||||
{
|
||||
"socket(%p) local[%s] remote[%s] Request interrupted: %s",
|
||||
sock.get(),
|
||||
string(local(*this)),
|
||||
string(remote(*this)),
|
||||
e.what()
|
||||
};
|
||||
|
||||
close(net::dc::SSL_NOTIFY, net::close_ignore);
|
||||
return false;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::critical
|
||||
|
@ -726,6 +726,11 @@ catch(const std::exception &e)
|
|||
|
||||
return false;
|
||||
}
|
||||
catch(const ctx::terminated &)
|
||||
{
|
||||
close(net::dc::RST, net::close_ignore);
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Handle a single request within the client main() loop.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue