forked from p15670423/monkey
Agent: Return set when building server list
This commit is contained in:
parent
799aae4498
commit
9ada95c126
|
@ -259,9 +259,9 @@ class InfectionMonkey:
|
||||||
return agent_event_serializer_registry
|
return agent_event_serializer_registry
|
||||||
|
|
||||||
def _build_server_list(self, relay_port: int):
|
def _build_server_list(self, relay_port: int):
|
||||||
my_servers = map(str, self._opts.servers)
|
my_servers = set(map(str, self._opts.servers))
|
||||||
relay_servers = [f"{ip}:{relay_port}" for ip in get_my_ip_addresses()]
|
relay_servers = set([f"{ip}:{relay_port}" for ip in get_my_ip_addresses()])
|
||||||
return my_servers + relay_servers
|
return my_servers.union(relay_servers)
|
||||||
|
|
||||||
def _build_master(self, relay_port: int):
|
def _build_master(self, relay_port: int):
|
||||||
servers = self._build_server_list(relay_port)
|
servers = self._build_server_list(relay_port)
|
||||||
|
|
Loading…
Reference in New Issue