Ping failure [message #1817399] |
Thu, 21 November 2019 15:59 |
Andrew Walsh Messages: 5 Registered: November 2019 |
Junior Member |
|
|
Hello,
I'm using v1.1.0 of the Paho MQTT embedded-c++ client. It's very useful; thank you!
However, I find I have some strange (I think!) behaviour when it should send out a ping. I have set a keep-alive interval of 10 minutes. When it gets to this time, the keepalive() function attempts to send a ping request packet. No messages have been received by the client since it last transmitted a message (10 minutes). The ping appears to be successfully serialised and passed to the underlying transport layer (which is mbedtls, in this case!)
However, the next time the keepalive() function is called (which is instantaneous, even before the ping request appears on the wire - I have a breakpoint in it, I run after the ping request is queued, and it breaks immediately), a failure is occurs ("PINGRESP not received in keepalive interval"). It appears that the last_received timer has expired.
Interestingly, when the ping request is sent, the last_sent timer is reset, but the last_received timer is not. Since this last_sent and last_received timers seem to be started at the same time and both configured with the keep-alive interval, this might explain why this failure occurs? I would have expected that the last_received timer would need to be reset when the ping request was sent, to allow a period for the ping response to arrive.
Am I misusing or misunderstanding something here?
Many thanks,
Andrew Walsh.
|
|
|
Re: Ping failure [message #1817737 is a reply to message #1817399] |
Thu, 28 November 2019 10:51 |
Andrew Walsh Messages: 5 Registered: November 2019 |
Junior Member |
|
|
Hello again,
After looking around a bit more, I noticed that the ping handling code has changed since v1.1.0, so I'm assuming this fixes the above problem.
Any chance of another release? :-D Or should I use the head / tip of the respository?
Thanks,
Andrew.
[Updated on: Thu, 28 November 2019 10:57] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04067 seconds