Skip to content

Commit

Permalink
fix: always log the connection attempt number (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Dec 2, 2022
1 parent 5b9cd17 commit 3306053
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bleak_retry_connector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,14 @@ def _raise_if_needed(name: str, description: str, exc: Exception) -> None:
if not create_client:
create_client = ble_device_has_changed(original_device, device)

if debug_enabled:
_LOGGER.debug(
"%s - %s: Connection attempt: %s",
name,
device.address,
attempt,
)

if create_client:
client = client_class(
device, disconnected_callback=disconnected_callback, **kwargs
Expand Down

0 comments on commit 3306053

Please sign in to comment.