diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-04-21 01:22:07 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-04-21 01:31:37 +0100 |
commit | 838810b76af338ecd5d2a34409b4e6ca78daaddb (patch) | |
tree | ec4091572f83f85f6180e4db795cf509d65397b0 | |
parent | Remove redundant function (diff) | |
download | synapse-838810b76af338ecd5d2a34409b4e6ca78daaddb.tar.xz |
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.
-rw-r--r-- | synapse/handlers/room_member.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py index 08fc6d6783..28b2c80a93 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py @@ -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( |