mirror of
https://github.com/shirou/mqttcli.git
synced 2025-04-26 13:49:17 +08:00
Merge pull request #7 from sparrc/set-timeout-60s
This is now fixed in the Paho client, setting timeout to 60s
This commit is contained in:
commit
98b7c997a2
@ -15,12 +15,7 @@ func subscribe(c *cli.Context) {
|
||||
log.Error(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Setting KeepAlive to 0 disables it. Paho MQTT client is currently broken
|
||||
// and does not send ping when subscribing only.
|
||||
// TODO set KeepAlive to a real value (60s?) when this change is merged:
|
||||
// https://git.eclipse.org/r/#/c/65850/
|
||||
opts.SetKeepAlive(time.Duration(0))
|
||||
opts.SetKeepAlive(time.Second * 60)
|
||||
|
||||
if c.Bool("c") {
|
||||
clientId := c.String("i")
|
||||
|
Loading…
x
Reference in New Issue
Block a user