diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-04-15 12:40:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 12:40:18 -0400 |
commit | eed7c5b89eee6951ac17861b1695817470bace36 (patch) | |
tree | 755c120c53df6f00dcdf75d2a8b00c3fdc705eb9 /synapse/handlers/device.py | |
parent | Add notes to the changelog about an additional SSO template. (#7259) (diff) | |
download | synapse-eed7c5b89eee6951ac17861b1695817470bace36.tar.xz |
Convert auth handler to async/await (#7261)
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r-- | synapse/handlers/device.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py index 993499f446..9bd941b5a0 100644 --- a/synapse/handlers/device.py +++ b/synapse/handlers/device.py @@ -338,8 +338,10 @@ class DeviceHandler(DeviceWorkerHandler): else: raise - yield self._auth_handler.delete_access_tokens_for_user( - user_id, device_id=device_id + yield defer.ensureDeferred( + self._auth_handler.delete_access_tokens_for_user( + user_id, device_id=device_id + ) ) yield self.store.delete_e2e_keys_by_device(user_id=user_id, device_id=device_id) @@ -391,8 +393,10 @@ class DeviceHandler(DeviceWorkerHandler): # Delete access tokens and e2e keys for each device. Not optimised as it is not # considered as part of a critical path. for device_id in device_ids: - yield self._auth_handler.delete_access_tokens_for_user( - user_id, device_id=device_id + yield defer.ensureDeferred( + self._auth_handler.delete_access_tokens_for_user( + user_id, device_id=device_id + ) ) yield self.store.delete_e2e_keys_by_device( user_id=user_id, device_id=device_id |