Skip to content

Commit

Permalink
fix: set disconnected_callback in the constructor for newer bleak com…
Browse files Browse the repository at this point in the history
…pat (#49)
  • Loading branch information
bdraco authored Sep 26, 2022
1 parent e8cdae4 commit e2e25b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bleak_retry_connector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,9 @@ def _raise_if_needed(name: str, description: str, exc: Exception) -> None:
)

if create_client:
client = client_class(device, **kwargs)
if disconnected_callback:
client.set_disconnected_callback(disconnected_callback)
client = client_class(
device, disconnected_callback=disconnected_callback, **kwargs
)
create_client = False

if IS_LINUX:
Expand Down

0 comments on commit e2e25b3

Please sign in to comment.