Explorar el Código

fix(device): bump socketRetryLimit back to 1

0 retries leads to complete failure to communicate. It seems devices
need at least 1 retry to get the initial connection started.
Jason Rumney hace 5 días
padre
commit
2a0a0356a1
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      custom_components/tuya_local/device.py

+ 2 - 2
custom_components/tuya_local/device.py

@@ -127,10 +127,10 @@ class TuyaLocalDevice(object):
             raise e
 
         # we handle retries at a higher level so we can rotate protocol version
-        self._api.set_socketRetryLimit(0)
+        self._api.set_socketRetryLimit(1)
         if self._api.parent:
             # Retries cause problems for other children of the parent device
-            self._api.parent.set_socketRetryLimit(0)
+            self._api.parent.set_socketRetryLimit(1)
 
         self._refresh_task = None
         self._protocol_configured = protocol_version