2
0
Эх сурвалжийг харах

set clean session to true

abhishek9686 1 жил өмнө
parent
commit
9985f824da
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      mq/mq.go

+ 2 - 1
mq/mq.go

@@ -32,8 +32,9 @@ func setMqOptions(user, password string, opts *mqtt.ClientOptions) {
 	opts.SetPassword(password)
 	opts.SetAutoReconnect(true)
 	opts.SetConnectRetry(true)
-	opts.SetConnectRetryInterval(time.Second << 2)
+	opts.SetConnectRetryInterval(time.Second * 4)
 	opts.SetKeepAlive(time.Minute)
+	opts.SetCleanSession(true)
 	opts.SetWriteTimeout(time.Minute)
 }