Skip to content
Snippets Groups Projects
Commit 838810b7 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Broaden the conditions for locally_rejecting invites

The logic for marking invites as locally rejected was all well and good, but
didn't happen when the remote server returned a 500, or wasn't reachable, or
had no DNS, or whatever.

Just expand the except clause to catch everything.

Fixes https://github.com/matrix-org/synapse/issues/761.
parent 736b9a47
No related branches found
No related tags found
No related merge requests found
......@@ -287,7 +287,13 @@ class RoomMemberHandler(BaseHandler):
target.to_string(),
)
defer.returnValue(ret)
except SynapseError as e:
except Exception as e:
# if we were unable to reject the exception, just mark
# it as rejected on our end and plough ahead.
#
# The 'except' clause is very broad, but we need to
# capture everything from DNS failures upwards
#
logger.warn("Failed to reject invite: %s", e)
yield self.store.locally_reject_invite(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment