forked from p15670423/monkey
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:
parent
087027b20c
commit
707c79ab21
|
@ -227,6 +227,6 @@ class LockedHTTPServer(threading.Thread):
|
||||||
class HTTPConnectProxy(TransportProxyBase):
|
class HTTPConnectProxy(TransportProxyBase):
|
||||||
def run(self):
|
def run(self):
|
||||||
httpd = http.server.HTTPServer((self.local_host, self.local_port), HTTPConnectProxyHandler)
|
httpd = http.server.HTTPServer((self.local_host, self.local_port), HTTPConnectProxyHandler)
|
||||||
httpd.timeout = 30
|
httpd.timeout = 10
|
||||||
while not self._stopped:
|
while not self._stopped:
|
||||||
httpd.handle_request()
|
httpd.handle_request()
|
||||||
|
|
|
@ -6,7 +6,7 @@ from threading import Thread
|
||||||
from infection_monkey.transport.base import TransportProxyBase, update_last_serve_time
|
from infection_monkey.transport.base import TransportProxyBase, update_last_serve_time
|
||||||
|
|
||||||
READ_BUFFER_SIZE = 8192
|
READ_BUFFER_SIZE = 8192
|
||||||
DEFAULT_TIMEOUT = 30
|
DEFAULT_TIMEOUT = 10
|
||||||
|
|
||||||
logger = getLogger(__name__)
|
logger = getLogger(__name__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue