diff --git a/src/fw_api.py b/src/fw_api.py index fc7f697..12c315f 100644 --- a/src/fw_api.py +++ b/src/fw_api.py @@ -48,7 +48,7 @@ class current_instance: current_instance.token = new_token current_instance.listen_token = None if new_token: - current_instance.s.get(f'https://{current_instance.instance}') + current_instance.s.get(f'https://{current_instance.instance}', timeout=30) current_instance.s.headers.update({"Authorization": "Bearer " + new_token}) @@ -56,7 +56,7 @@ if current_instance.token: current_instance.s.headers.update({"Authorization": "Bearer " + current_instance.token}) else: # Get cookies from unauthorized instance for working some functionality (radios) - current_instance.s.get(f'https://{current_instance.instance}/') + current_instance.s.get(f'https://{current_instance.instance}/', timeout=30) @logger.catch @@ -79,7 +79,8 @@ def get_instance_settings(): def get_node_info(): r = current_instance.s.get( - f'https://{current_instance.instance}/api/v1/instance/nodeinfo/2.0/') + f'https://{current_instance.instance}/api/v1/instance/nodeinfo/2.0/', + timeout=30) r.raise_for_status() return r.json()