mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 18:24:57 -04:00
Remove hacky error handling for inlineDeferreds. (#7950)
This commit is contained in:
parent
c4268e3da6
commit
d8a9cd8d3e
3 changed files with 13 additions and 21 deletions
|
@ -1887,9 +1887,6 @@ class FederationHandler(BaseHandler):
|
|||
origin, event, state=state, auth_events=auth_events, backfilled=backfilled
|
||||
)
|
||||
|
||||
# reraise does not allow inlineCallbacks to preserve the stacktrace, so we
|
||||
# hack around with a try/finally instead.
|
||||
success = False
|
||||
try:
|
||||
if (
|
||||
not event.internal_metadata.is_outlier()
|
||||
|
@ -1903,12 +1900,11 @@ class FederationHandler(BaseHandler):
|
|||
await self.persist_events_and_notify(
|
||||
[(event, context)], backfilled=backfilled
|
||||
)
|
||||
success = True
|
||||
finally:
|
||||
if not success:
|
||||
run_in_background(
|
||||
self.store.remove_push_actions_from_staging, event.event_id
|
||||
)
|
||||
except Exception:
|
||||
run_in_background(
|
||||
self.store.remove_push_actions_from_staging, event.event_id
|
||||
)
|
||||
raise
|
||||
|
||||
return context
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue