Added aditional comments
This commit is contained in:
1 parent
6374562137
commit
349287cf8c
1 file changed
+2
@@ -18,6 +18,8 @@ func NewClient(logger *zap.Logger, config *config.Config, csvHelper *csv.Helper)
|
|||||||
opts.SetKeepAlive(2 * time.Second)
|
opts.SetKeepAlive(2 * time.Second)
|
||||||
opts.SetDefaultPublishHandler(f)
|
opts.SetDefaultPublishHandler(f)
|
||||||
opts.SetPingTimeout(1 * time.Second)
|
opts.SetPingTimeout(1 * time.Second)
|
||||||
|
// TODO: Check this option and see if it solves the re-subscribe on reconnect issue
|
||||||
|
// opts.SetCleanSession(false)
|
||||||
opts.SetConnectionNotificationHandler(func(client mqtt.Client, notification mqtt.ConnectionNotification) {
|
opts.SetConnectionNotificationHandler(func(client mqtt.Client, notification mqtt.ConnectionNotification) {
|
||||||
switch n := notification.(type) {
|
switch n := notification.(type) {
|
||||||
case mqtt.ConnectionNotificationConnected:
|
case mqtt.ConnectionNotificationConnected:
|
||||||
|
|||||||
Reference in new issue
Block a user