From b353f8526e27cc3722b58c15aa2b66c12178699f Mon Sep 17 00:00:00 2001 From: alfrix Date: Sun, 12 Feb 2023 03:27:51 -0600 Subject: [PATCH] timeout requests to prevent locking --- ks_includes/KlippyRest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ks_includes/KlippyRest.py b/ks_includes/KlippyRest.py index f007d8b2..54a244cb 100644 --- a/ks_includes/KlippyRest.py +++ b/ks_includes/KlippyRest.py @@ -37,7 +37,7 @@ class KlippyRest: headers = {} if self.api_key is False else {"x-api-key": self.api_key} data = False try: - response = requests.get(url, headers=headers) + response = requests.get(url, headers=headers, timeout=3) response.raise_for_status() if json: logging.debug(f"Sending request to {url}")