paho.mqtt.c
paho.mqtt.c copied to clipboard
keepaliveinterval change to 2
Hi,
I am developing a gateway device that sends measurement data with MQTT using the ver1.2.0 library.
Issuing MQTT failed during operation, and reconnection was processed, but the keepaliveinterval value was an unintended value of 2, and connection was not possible. (Because the keepaliveinterval in the connection destination specification is 0 or a value of 5 or more) 0 is entered for keepaliveinterval, and the value is entered once at startup.
Also, is there a function to change the value of keepaliveinterval during operation?
Do you know anything about this issue? Any help would be appreciated .
Best regards, Suematsu
1.2.0 is outdated. You can't change the value of keepaliveinterval during operation. What OS do you use? If you use Windows you are maybe affected by #927
Hi jumoog,
Thank you for your reply. The device uses linux OS.
Best regards, Suematsu
The most recent version of the library is 1.3.12. As @jumoog says, you can't change the keepalive interval except at connect time. You should try a recent version of the library.