diff --git a/monkey/infection_monkey/tunnel.py b/monkey/infection_monkey/tunnel.py index 769260d6b..b0f778534 100644 --- a/monkey/infection_monkey/tunnel.py +++ b/monkey/infection_monkey/tunnel.py @@ -126,7 +126,7 @@ class MonkeyTunnel(Thread): self._stopped = Event() self._clients = [] self.local_port = None - super(MonkeyTunnel, self).__init__() + super(MonkeyTunnel, self).__init__(name="MonkeyTunnelThread") self.daemon = True self.l_ips = None self._wait_for_exploited_machines = Event() diff --git a/monkey/infection_monkey/utils/threading.py b/monkey/infection_monkey/utils/threading.py index 80b688759..d1b84523b 100644 --- a/monkey/infection_monkey/utils/threading.py +++ b/monkey/infection_monkey/utils/threading.py @@ -7,7 +7,10 @@ logger = logging.getLogger(__name__) def run_worker_threads( - target: Callable[..., None], name_prefix: str = None, args: Tuple = (), num_workers: int = 2 + target: Callable[..., None], + name_prefix: Optional[str] = None, + args: Tuple = (), + num_workers: int = 2, ): worker_threads = [] counter = run_worker_threads.counters.setdefault(name_prefix, count(start=1))