Skip to content

Commit

Permalink
Disable get_external_ip if login_tracking disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
JabLuszko authored Jun 12, 2024
1 parent cd3fb2c commit 85e6c0a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions mapadroid/worker/strategy/AbstractWorkerStrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,12 @@ async def start_pogo(self) -> bool:

if start_result:
logger.success("startPogo: Started pogo successfully...")
ip_of_device: Optional[str] = await self._communicator.get_external_ip()
if not ip_of_device:
logger.warning("Cannot retrieve IP of device.")
else:
await self._mapping_manager.login_tracking_set_ip(self._worker_state.origin, ip_of_device)
if MadGlobals.application_args.enable_login_tracking:
ip_of_device: Optional[str] = await self._communicator.get_external_ip()
if not ip_of_device:
logger.warning("Cannot retrieve IP of device.")
else:
await self._mapping_manager.login_tracking_set_ip(self._worker_state.origin, ip_of_device)

await self._wait_pogo_start_delay()
start_delay: int = await self.get_devicesettings_value(
Expand Down

0 comments on commit 85e6c0a

Please sign in to comment.