[FIX] hw_drivers: Fix request to iot-proxy.odoo.com on AP mode
If IoT Box is on access point mode the box try to reach https://iot-proxy.odoo.com to get pairing code. So the box try while 5 minutes to reach iot-proxy and send request on network every 10 secondes. Now we add a condition 'if not access_point()' to send these request. closes odoo/odoo#57976 X-original-commit: 901dc987c0204a7df2b811bb430f31eabf204fbb Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is contained in:
@@ -22,7 +22,7 @@ class ConnectionManager(Thread):
|
||||
self.pairing_uuid = False
|
||||
|
||||
def run(self):
|
||||
if not helpers.get_odoo_server_url():
|
||||
if not helpers.get_odoo_server_url() and not helpers.access_point():
|
||||
end_time = datetime.now() + timedelta(minutes=5)
|
||||
while (datetime.now() < end_time):
|
||||
self._connect_box()
|
||||
|
||||
Reference in New Issue
Block a user