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

auto reconnect not work if the network break four hours when network recorvery

Open leetb-leetb opened this issue 10 months ago • 1 comments

version 1.3.14, my code is blew: conn_opts.automaticReconnect = 1; conn_opts.minRetryInterval = 48; conn_opts.maxRetryInterval = 96; conn_opts.keepAliveInterval = 60;

when my netwok broken , i can receive MQTTAsync_connectionLost, but after four hours or more , my network recovery, the client can't auto reconnect, seem the client had sleepped, i must do something to wake up client,then it can auto connect, is there some settings which let client not sleep, always to retry to reconnect?

leetb-leetb avatar Jan 26 '25 14:01 leetb-leetb

You need to take a trace at the protocol level as described in the README so I can see what actions are being taken.

What is the OS?

Does automatic reconnect work if the time period is smaller, or does it never work?

icraggs avatar Feb 11 '25 16:02 icraggs

No further information forthcoming.

icraggs avatar Aug 12 '25 10:08 icraggs