0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-09 21:48:55 +02:00

ircd:Ⓜ️:typing: Handle and log exceptions in timeout worker stack.

This commit is contained in:
Jason Volk 2020-03-03 14:47:47 -08:00
parent c14bef8cd9
commit 2896b721ff

View file

@ -356,6 +356,7 @@ timeout_worker()
bool
timeout_check()
try
{
const auto now
{
@ -375,9 +376,20 @@ timeout_check()
return false;
}
catch(const std::exception &e)
{
log::critical
{
typing_log, "Typing timeout check :%s",
e.what(),
};
return false;
}
void
timeout_timeout(const typist &t)
try
{
assert(run::level == run::level::RUN);
@ -403,6 +415,16 @@ timeout_timeout(const typist &t)
// sent to clients to stop the typing for this timed out user.
_handle_edu_m_typing(event, edu);
}
catch(const std::exception &e)
{
log::error
{
typing_log, "Typing timeout for %s in %s :%s",
string_view{t.user_id},
string_view{t.room_id},
e.what(),
};
}
//
// internal