@@ -382,7 +382,7 @@ void MainApp::sendBridgesToThreads()
382382 }
383383}
384384
385- void MainApp::queueBridgeReconnectAllThreads (bool alsoQueueNexts )
385+ void MainApp::queueBridgeReconnectAllThreads ()
386386{
387387 try
388388 {
@@ -396,12 +396,6 @@ void MainApp::queueBridgeReconnectAllThreads(bool alsoQueueNexts)
396396 Logger *logger = Logger::getInstance ();
397397 logger->logf (LOG_ERR, ex.what ());
398398 }
399-
400- if (alsoQueueNexts)
401- {
402- auto fReconnectBridges = std::bind (&MainApp::queueBridgeReconnectAllThreads, this , false );
403- timed_tasks.addTask (fReconnectBridges , 5000 , true );
404- }
405399}
406400
407401void MainApp::queueInternalHeartbeat ()
@@ -670,7 +664,7 @@ void MainApp::start()
670664 }
671665
672666 sendBridgesToThreads ();
673- queueBridgeReconnectAllThreads (true );
667+ queueBridgeReconnectAllThreads ();
674668
675669 std::minstd_rand randomish;
676670 randomish.seed (get_random_int<unsigned long >());
@@ -1100,7 +1094,7 @@ void MainApp::loadConfig(bool reload)
11001094 if (reload)
11011095 {
11021096 sendBridgesToThreads ();
1103- queueBridgeReconnectAllThreads (false );
1097+ queueBridgeReconnectAllThreads ();
11041098 }
11051099 }
11061100
@@ -1225,6 +1219,15 @@ void MainApp::reloadTimers(bool reload, const Settings &old_settings)
12251219 auto fInternalHeartbeat = std::bind (&MainApp::queueInternalHeartbeat, this );
12261220 timed_tasks.addTask (fInternalHeartbeat , HEARTBEAT_INTERVAL, true );
12271221 }
1222+
1223+ {
1224+ uint32_t interval = 5000 ;
1225+ #ifdef TESTING
1226+ interval = 1000 ;
1227+ #endif
1228+ auto fReconnectBridges = std::bind (&MainApp::queueBridgeReconnectAllThreads, this );
1229+ timed_tasks.addTask (fReconnectBridges , interval, true );
1230+ }
12281231}
12291232
12301233/* *
0 commit comments