adding force peer push every 5 min

This commit is contained in:
afeiszli
2022-02-08 21:34:38 -05:00
parent d5bae019b3
commit d4b15f0a2d
2 changed files with 43 additions and 22 deletions

View File

@@ -132,7 +132,10 @@ func SetupMQTT(cfg *config.ClientConfig, publish bool) mqtt.Client {
ncutils.Log("detected broker connection lost, running pull for " + cfg.Node.Network)
_, err := Pull(cfg.Node.Network, true)
if err != nil {
ncutils.Log("could not run pull, please restart daemon or examine network connectivity --- " + err.Error())
ncutils.Log("could not run pull, server unreachable, restarting daemon in 5 minutes..." + err.Error())
time.Sleep(time.Minute * 5)
ncutils.Log("restarting netclient")
daemon.Restart()
}
ncutils.Log("connection re-established with mqtt server")
})