diff options
author | Abel Lucas <uael@google.com> | 2023-03-21 18:15:23 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-03-21 18:15:23 +0000 |
commit | ce72ac4864baa84a08d334fafcd8729583bb7f47 (patch) | |
tree | 25d059e36d194dc0a1638762ffb46ff5b6486739 /avatar | |
parent | 3cfc3887c191c4053649b15951ef274d0db270d3 (diff) | |
parent | 7010b7427852984c0c5b54c1dd5693316774a291 (diff) | |
download | avatar-ce72ac4864baa84a08d334fafcd8729583bb7f47.tar.gz |
Merge "bumble: fix missing listener removal on `WaitDisconnection`" into main
Diffstat (limited to 'avatar')
-rw-r--r-- | avatar/bumble_server/host.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/avatar/bumble_server/host.py b/avatar/bumble_server/host.py index a9f3b70..3957389 100644 --- a/avatar/bumble_server/host.py +++ b/avatar/bumble_server/host.py @@ -232,8 +232,11 @@ class HostService(HostServicer): disconnection_future.set_result(None) connection.on('disconnection', on_disconnection) - await disconnection_future - self.log.info("Disconnected") + try: + await disconnection_future + self.log.info("Disconnected") + finally: + connection.remove_listener('disconnection', on_disconnection) # type: ignore return empty_pb2.Empty() |