summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-11-20 02:49:23 +0300
committerMaxim Devaev <[email protected]>2022-11-20 02:49:23 +0300
commit59ed36a6af79d9defbdeade9927ec61871295249 (patch)
tree0b8331236c5cf378fdf764743dea0414cfb41711 /kvmd
parenteb05fd4d3b46ec567fe21063a736469d51a2daf4 (diff)
janus: fast startup
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/apps/janus/runner.py4
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