mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 00:32:35 +01:00
ircd:Ⓜ️:typing: Handle and log exceptions in timeout worker stack.
This commit is contained in:
parent
c14bef8cd9
commit
2896b721ff
1 changed files with 22 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue