This commit is contained in:
wh1te909 2022-06-26 15:34:00 -07:00
parent aed33b9a95
commit 8d2511129c
8 changed files with 29 additions and 13 deletions

View file

@ -12,7 +12,6 @@ https://license.tacticalrmm.com
package agent
import (
"fmt"
"sync"
"time"
@ -38,8 +37,7 @@ func (a *Agent) AgentSvc() {
time.Sleep(time.Duration(sleepDelay) * time.Second)
opts := a.setupNatsOptions()
server := fmt.Sprintf("tls://%s:4222", a.ApiURL)
nc, err := nats.Connect(server, opts...)
nc, err := nats.Connect(a.NatsServer, opts...)
if err != nil {
a.Logger.Fatalln("AgentSvc() nats.Connect()", err)
}