Correctly await on_logged_out callbacks (#11786)

This commit is contained in:
Brendan Abolivier 2022-01-20 19:19:40 +01:00 committed by GitHub
parent d09099642e
commit bfe6d5553a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 2 deletions

View file

@ -2281,7 +2281,7 @@ class PasswordAuthProvider:
# call all of the on_logged_out callbacks
for callback in self.on_logged_out_callbacks:
try:
callback(user_id, device_id, access_token)
await callback(user_id, device_id, access_token)
except Exception as e:
logger.warning("Failed to run module API callback %s: %s", callback, e)
continue