Просмотр исходного кода

Retry more before giving up.

Previously 4 retries got us through both protocol versions twice, but from observation it was still sometimes possible for a device to become stuck offline.
Now that there are three protocol versions, 4 retries is not enough.
Jason Rumney 3 лет назад
Родитель
Сommit
704e40c4bc
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      custom_components/tuya_local/device.py

+ 1 - 1
custom_components/tuya_local/device.py

@@ -55,7 +55,7 @@ class TuyaLocalDevice(object):
         # its switches.
         self._FAKE_IT_TIL_YOU_MAKE_IT_TIMEOUT = 10
         self._CACHE_TIMEOUT = 20
-        self._CONNECTION_ATTEMPTS = 4
+        self._CONNECTION_ATTEMPTS = 9
         self._lock = Lock()
 
     @property