From a220ff84851f20617ffee54a1a7347b1450c1338 Mon Sep 17 00:00:00 2001 From: jesopo Date: Thu, 4 Oct 2018 17:10:05 +0100 Subject: [PATCH] Timeout REST API requests after 10 seconds --- modules/rest_api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/rest_api.py b/modules/rest_api.py index 2522b109..63e16ee5 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -5,6 +5,7 @@ from src import utils _bot = None _events = None class Handler(http.server.BaseHTTPRequestHandler): + timeout = 10 def do_GET(self): _bot.lock.acquire() parsed = urllib.parse.urlparse(self.path)