paho.mqtt.c icon indicating copy to clipboard operation
paho.mqtt.c copied to clipboard

keepaliveinterval change to 2

Open SuematsuR opened this issue 2 years ago • 3 comments

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

SuematsuR avatar Aug 30 '23 04:08 SuematsuR

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

jumoog avatar Aug 30 '23 07:08 jumoog

Hi jumoog,

Thank you for your reply. The device uses linux OS.

Best regards, Suematsu

SuematsuR avatar Sep 01 '23 00:09 SuematsuR

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.

icraggs avatar Oct 01 '23 12:10 icraggs