From d0800180db570cc08d470435e0ac9d3a9652c54a Mon Sep 17 00:00:00 2001 From: amnonbb Date: Fri, 25 Aug 2023 11:51:43 +0300 Subject: [PATCH] Bring back default keepalive due mqqt lib bug (https://github.com/eclipse/paho.mqtt.golang/issues/317) --- api/app.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/api/app.go b/api/app.go index b9789d2..a3098e2 100644 --- a/api/app.go +++ b/api/app.go @@ -11,7 +11,6 @@ import ( "github.com/rs/cors" "github.com/rs/zerolog/log" "net/http" - "time" ) type App struct { @@ -108,8 +107,6 @@ func (a *App) initMQTT() { opts.SetClientID(common.EP + "-exec_mqtt_client") opts.SetUsername(common.USERNAME) opts.SetPassword(common.PASSWORD) - opts.SetKeepAlive(10 * time.Second) - opts.SetPingTimeout(5 * time.Second) opts.SetAutoReconnect(true) opts.SetOnConnectHandler(a.SubMQTT) opts.SetConnectionLostHandler(a.LostMQTT)