Commit a00767a73b46c9e5485d2ea8cc8a62f305aecdd7

Authored by Adhidarma Hadiwinoto
1 parent 1f0a0f8db6
Exists in master

Another log

Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff

... ... @@ -22,6 +22,11 @@ const modemInfo = {
22 22 };
23 23  
24 24 if (!config.disable_idle_check) {
  25 + const intervalBeetwenCheckMs = config.interval_beetwen_signal_strength_ms
  26 + || DEFAULT_INTERVAL_BETWEEN_IDLE_CHECK_MS;
  27 +
  28 + logger.info('Registering idle / stuck modem background check', { intervalBeetwenCheckMs });
  29 +
25 30 setInterval(() => {
26 31 const deltaMs = new Date() - Math.max(
27 32 modemInfo.startTime,
... ... @@ -33,7 +38,7 @@ if (!config.disable_idle_check) {
33 38 logger.warn(`Modem idle for more than ${maxLastDataAgeMs} ms. Stucked modem? Terminating!`, { deltaMs });
34 39 process.exit(1);
35 40 }
36   - }, config.interval_beetwen_signal_strength_ms || DEFAULT_INTERVAL_BETWEEN_IDLE_CHECK_MS);
  41 + }, intervalBeetwenCheckMs);
37 42 } else {
38 43 logger.info('Skip idle / stuck modem background check by config.disable_idle_check');
39 44 }