Skip to content

Commit

Permalink
fix: teach the connector about more esp32 errors and times
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Nov 19, 2022
1 parent 31bd580 commit 85fdf73
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bleak_retry_connector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# to run their cleanup callbacks or the
# retry call will just fail in the same way.
BLEAK_TRANSIENT_BACKOFF_TIME = 0.25
BLEAK_TRANSIENT_MEDIUM_BACKOFF_TIME = 0.55
BLEAK_TRANSIENT_MEDIUM_BACKOFF_TIME = 0.90
BLEAK_TRANSIENT_LONG_BACKOFF_TIME = 1.25
BLEAK_DBUS_BACKOFF_TIME = 0.25
BLEAK_OUT_OF_SLOTS_BACKOFF_TIME = 4.00
Expand Down Expand Up @@ -88,13 +88,18 @@
# so we have an additional timeout to
# be sure we do not block forever
# This is likely fixed in https://github.com/hbldh/bleak/pull/1092
BLEAK_SAFETY_TIMEOUT = 21.0
#
# This also accounts for the time it
# takes for the esp32s to disconnect
#
BLEAK_SAFETY_TIMEOUT = 30.0

TRANSIENT_ERRORS_LONG_BACKOFF = {
"ESP_GATT_ERROR",
}

TRANSIENT_ERRORS_MEDIUM_BACKOFF = {
"ESP_GATT_CONN_TIMEOUT",
"ESP_GATT_CONN_FAIL_ESTABLISH",
}

Expand Down

0 comments on commit 85fdf73

Please sign in to comment.