[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] MQTT Paho doesn't return disconnection on network loss
|
Hi,
version 1.3.8 is over 3 years old now, and there have been
changes affecting keep alive, so I would try the latest release
1.3.13.
Ian Craggs
On 16/02/2024 19:08, kunal takalkar via
paho-dev wrote:
Hi,
I tried to send small messages using the MQTT protocol to a
server:
Environment:
Docker on Ubuntu 22.04.3 LTS (x86-64)
Libraries used: paho.mqtt.c-1.3.13, paho.mqtt.cpp-1.3.2
Steps Performed:
I am connected to the MQTT broker.
I start sending messages.
The Internet is disconnected.
With no internet connection, I am still sending
messages. At some point, paho reports that the buffer is
full.
(KeepAlive time is 20 secs. Considering tiny messages,
I believe it's good enough).
Observed behavior:
PING request is initiated from the library.
Disconnection is reported to the client only
when there are no messages being sent in the
disconnected state.
Expected behavior:
Disconnection is reported to the client even if messages
are being sent in the disconnected state.
Query:
1. Is this a known issue or is it expected behavior? If
it's an issue, is it fixed on the latest source code (at
least I don't see any relevant commits)?
2. I could see there is something like: m->c->net.lastSent
=
MQTTTime_now();
I believe, lastSent doesn't care if it's a message
successfully sent or an unsuccessful(buffered) message. Is
my understanding correct?
Please let me know if my understanding is wrong on any
of the things mentioned above.
Thank you!
Hi,
I am trying to send small messages using the MQTT
protocol to a server.
Environment:
Docker on Ubuntu 22.04.3 LTS (x86-64)
Libraries used: paho.mqtt.c-1.3.8, paho.mqtt.cpp-1.2.0
Steps Performed:
I am connected to the MQTT broker.
I start sending messages.
The Internet is disconnected.
With no internet connection, I am still sending
messages. At some point, paho reports that the buffer
is full.
(KeepAlive time is 20 secs. Considering tiny
messages, I believe it's good enough).
Observed behavior:
PING request is not initiated from the library.
No disconnection is reported to the client
Expected behavior:
PING Request should be initiated. If PINGRESP is
not received within the keepalive interval,
disconnection should be reported to the client.
Query:
Is this a known issue?
If yes, is it already fixed in any of the latest
releases?
I have attached the logs for reference.
Please let me know if my understanding is wrong on
any of the things mentioned above.
Thank you,
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/paho-dev