Explorar el Código

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 hace 3 años
padre
commit
704e40c4bc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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