mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-26 14:06:15 +08:00
fix for node connect/disconnect issue
This commit is contained in:
parent
524cef8c29
commit
77c901e4d9
1 changed files with 1 additions and 1 deletions
|
|
@ -239,7 +239,7 @@ func setupMQTTSingleton(cfg *config.ClientConfig) error {
|
||||||
opts.AddBroker("mqtts://" + server + ":" + port)
|
opts.AddBroker("mqtts://" + server + ":" + port)
|
||||||
opts.SetUsername(cfg.Node.ID)
|
opts.SetUsername(cfg.Node.ID)
|
||||||
opts.SetPassword(string(pass))
|
opts.SetPassword(string(pass))
|
||||||
mqclient := mqtt.NewClient(opts)
|
mqclient = mqtt.NewClient(opts)
|
||||||
var connecterr error
|
var connecterr error
|
||||||
opts.SetClientID(ncutils.MakeRandomString(23))
|
opts.SetClientID(ncutils.MakeRandomString(23))
|
||||||
if token := mqclient.Connect(); !token.WaitTimeout(30*time.Second) || token.Error() != nil {
|
if token := mqclient.Connect(); !token.WaitTimeout(30*time.Second) || token.Error() != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue