mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
modules/federation/sender: Don't propagate exceptions outside of the hook handler.
This commit is contained in:
parent
56ab4f397c
commit
c1b3dc1142
2 changed files with 27 additions and 0 deletions
|
@ -755,6 +755,7 @@ ircd::m::sync::longpoll::notified
|
|||
void
|
||||
ircd::m::sync::longpoll::handle_notify(const m::event &event,
|
||||
m::vm::eval &eval)
|
||||
try
|
||||
{
|
||||
assert(eval.opts);
|
||||
if(!eval.opts->notify_clients)
|
||||
|
@ -762,6 +763,19 @@ ircd::m::sync::longpoll::handle_notify(const m::event &event,
|
|||
|
||||
dock.notify_all();
|
||||
}
|
||||
catch(const ctx::interrupted &)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::critical
|
||||
{
|
||||
log, "request %s longpoll notify :%s",
|
||||
loghead(eval),
|
||||
e.what(),
|
||||
};
|
||||
}
|
||||
|
||||
/// Longpolling blocks the client's request until a relevant event is processed
|
||||
/// by the m::vm. If no event is processed by a timeout this returns false.
|
||||
|
|
|
@ -71,6 +71,7 @@ notified
|
|||
void
|
||||
handle_notify(const m::event &event,
|
||||
m::vm::eval &eval)
|
||||
try
|
||||
{
|
||||
if(!my(event))
|
||||
return;
|
||||
|
@ -89,6 +90,18 @@ handle_notify(const m::event &event,
|
|||
notified_queue.emplace_back(json::strung{event}, event_id);
|
||||
notified_dock.notify_all();
|
||||
}
|
||||
catch(const ctx::interrupted &)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::critical
|
||||
{
|
||||
m::log, "Federation sender notify handler :%s",
|
||||
e.what()
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
__attribute__((noreturn))
|
||||
|
|
Loading…
Reference in a new issue