From 9423e9f142d477618fb42e9c59445be3c9a67464 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 3 Apr 2023 16:31:03 -0400 Subject: [PATCH] Increase default connect timeout to 10 seconds 4 seconds, the previous default connect timeout, was too short sometimes, when testing blinka_bleio with `bleak 0.20.1`. --- adafruit_ble/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_ble/__init__.py b/adafruit_ble/__init__.py index c1180fd..fc303ee 100755 --- a/adafruit_ble/__init__.py +++ b/adafruit_ble/__init__.py @@ -297,7 +297,7 @@ def stop_scan(self) -> None: self._adapter.stop_scan() def connect( - self, peer: Union[Advertisement, _bleio.Address], *, timeout: float = 4.0 + self, peer: Union[Advertisement, _bleio.Address], *, timeout: float = 10.0 ) -> BLEConnection: """ Initiates a `BLEConnection` to the peer that advertised the given advertisement.