From 333e587aabbc98e6e10effc9341fdc36264875c9 Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Tue, 6 Sep 2022 13:20:19 +0000 Subject: [PATCH] Agent: Use is_set() of threading.Event --- monkey/infection_monkey/network/relay/tcp_connection_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/infection_monkey/network/relay/tcp_connection_handler.py b/monkey/infection_monkey/network/relay/tcp_connection_handler.py index dd8d315e3..6064e378b 100644 --- a/monkey/infection_monkey/network/relay/tcp_connection_handler.py +++ b/monkey/infection_monkey/network/relay/tcp_connection_handler.py @@ -26,7 +26,7 @@ class TCPConnectionHandler(Thread): l_socket.settimeout(PROXY_TIMEOUT) l_socket.listen(5) - while not self._stopped: + while not self._stopped.is_set(): try: source, _ = l_socket.accept() except socket.timeout: