diff options
author | Maxim Devaev <[email protected]> | 2022-11-20 02:49:23 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2022-11-20 02:49:23 +0300 |
commit | 59ed36a6af79d9defbdeade9927ec61871295249 (patch) | |
tree | 0b8331236c5cf378fdf764743dea0414cfb41711 /kvmd | |
parent | eb05fd4d3b46ec567fe21063a736469d51a2daf4 (diff) |
janus: fast startup
Diffstat (limited to 'kvmd')
-rw-r--r-- | kvmd/apps/janus/runner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmd/apps/janus/runner.py b/kvmd/apps/janus/runner.py index af7e064d..140a7b62 100644 --- a/kvmd/apps/janus/runner.py +++ b/kvmd/apps/janus/runner.py @@ -64,11 +64,13 @@ class JanusRunner: # pylint: disable=too-many-instance-attributes async def __run(self) -> None: logger = get_logger(0) + logger.info("Probbing the network first time ...") + prev_netcfg: (_Netcfg | None) = None while True: retry = 0 netcfg = _Netcfg() - for retry in range(self.__check_retries): + for retry in range(1 if prev_netcfg is None else self.__check_retries): netcfg = await self.__get_netcfg() if netcfg.ext_ip: break |