Agent: Reduce proxy timeouts from 30 to 10 seconds

Stopping the agent is delayed by these timeouts. Reducing them allows
the agent to stop more rapidly on average.

Fixes #1372
This commit is contained in:
Mike Salvatore 2022-03-24 08:35:18 -04:00
parent 087027b20c
commit 707c79ab21
2 changed files with 2 additions and 2 deletions

View File

@ -227,6 +227,6 @@ class LockedHTTPServer(threading.Thread):
class HTTPConnectProxy(TransportProxyBase):
def run(self):
httpd = http.server.HTTPServer((self.local_host, self.local_port), HTTPConnectProxyHandler)
httpd.timeout = 30
httpd.timeout = 10
while not self._stopped:
httpd.handle_request()

View File

@ -6,7 +6,7 @@ from threading import Thread
from infection_monkey.transport.base import TransportProxyBase, update_last_serve_time
READ_BUFFER_SIZE = 8192
DEFAULT_TIMEOUT = 30
DEFAULT_TIMEOUT = 10
logger = getLogger(__name__)