From df654648307c22e075d1bdb5028ebd3c4c563913 Mon Sep 17 00:00:00 2001 From: Tomaae <23486452+tomaae@users.noreply.github.com> Date: Mon, 8 May 2023 02:53:09 +0200 Subject: [PATCH] added request timeout to API --- custom_components/portainer/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/portainer/api.py b/custom_components/portainer/api.py index 427a6f3..4cd6517 100644 --- a/custom_components/portainer/api.py +++ b/custom_components/portainer/api.py @@ -84,6 +84,7 @@ def query( headers=headers, params=params, verify=self._ssl_verify, + timeout=10, ) elif method == "post": @@ -92,6 +93,7 @@ def query( headers=headers, json=params, verify=self._ssl_verify, + timeout=10, ) if response.status_code == 200: