Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Ping failure
Ping failure [message #1817399] Thu, 21 November 2019 15:59 Go to next message
Andrew Walsh is currently offline Andrew WalshFriend
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 Go to previous message
Andrew Walsh is currently offline Andrew WalshFriend
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

Previous Topic:Getting Started
Next Topic:QOS2 messages not being sent in order when sending queued messages after automatic re-connection
Goto Forum:
  


Current Time: Mon Oct 26 20:06:17 GMT 2020

Powered by FUDForum. Page generated in 0.01923 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top