diff --git a/mq/mq.go b/mq/mq.go index dcc0a861..edb48539 100644 --- a/mq/mq.go +++ b/mq/mq.go @@ -55,7 +55,7 @@ func SetupMQTT() { opts.SetOrderMatters(true) opts.SetResumeSubs(true) }) - mqclient := mqtt.NewClient(opts) + mqclient = mqtt.NewClient(opts) tperiod := time.Now().Add(10 * time.Second) for { if token := mqclient.Connect(); !token.WaitTimeout(MQ_TIMEOUT*time.Second) || token.Error() != nil { diff --git a/netclient/functions/daemon.go b/netclient/functions/daemon.go index 8ae6624c..c00a91ba 100644 --- a/netclient/functions/daemon.go +++ b/netclient/functions/daemon.go @@ -271,7 +271,6 @@ func setupMQTT(cfg *config.ClientConfig) error { logger.Log(0, "network:", cfg.Node.Network, "detected broker connection lost for", cfg.Server.Server) }) mqclient = mqtt.NewClient(opts) - log.Println(mqclient) var connecterr error for count := 0; count < 3; count++ { connecterr = nil