forked from p15670423/monkey
Agent: Fix log call exhausting iterator
This commit is contained in:
parent
2fadfd1b31
commit
6051cfa29a
|
@ -126,6 +126,7 @@ class InfectionMonkey:
|
|||
return opts
|
||||
|
||||
def _get_server(self):
|
||||
logger.debug(f"Trying to wake up with servers: {', '.join(self._opts.servers)}")
|
||||
servers_iterator = (s for s in self._opts.servers)
|
||||
server = find_server(servers_iterator)
|
||||
if server:
|
||||
|
|
|
@ -14,8 +14,6 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
|
||||
def find_server(servers: Iterable[str]) -> Optional[str]:
|
||||
logger.debug(f"Trying to wake up with servers: {', '.join(servers)}")
|
||||
|
||||
for server in servers:
|
||||
logger.debug(f"Trying to connect to server: {server}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue