Browse Source

Apply wait time settings to HTTP calls

Nick Mills-Barrett 2 years ago
parent
commit
edf839087d
2 changed files with 3 additions and 2 deletions
  1. 3 1
      mauigpapi/http/base.py
  2. 0 1
      mauigpapi/mqtt/conn.py

+ 3 - 1
mauigpapi/http/base.py

@@ -96,7 +96,9 @@ class BaseAndroidAPI:
             logger=self.log,
             logger=self.log,
             proxy_handler=self.proxy_handler,
             proxy_handler=self.proxy_handler,
             on_proxy_change=self.on_proxy_update,
             on_proxy_change=self.on_proxy_update,
-            min_wait_seconds=1,  # we want to retry these pretty fast
+            # Wait 1s * errors, max 10s for fast failure
+            max_wait_seconds=10,
+            multiply_wait_seconds=1,
         )
         )
 
 
     @staticmethod
     @staticmethod

+ 0 - 1
mauigpapi/mqtt/conn.py

@@ -625,7 +625,6 @@ class AndroidMQTT:
             max_retries=retry_limit,
             max_retries=retry_limit,
             retryable_exceptions=(MQTTNotConnected, MQTTReconnectionError),
             retryable_exceptions=(MQTTNotConnected, MQTTReconnectionError),
             # Wait 1s * errors, max 10s for fast reconnect or die
             # Wait 1s * errors, max 10s for fast reconnect or die
-            min_wait_seconds=0,
             max_wait_seconds=10,
             max_wait_seconds=10,
             multiply_wait_seconds=1,
             multiply_wait_seconds=1,
         )
         )