You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the upgrade to 1.3.11 our MQTT client programs started sporadically timing out. Looking at the MQTT traces, the problem seems to be that they don't send PINGREQs when expected:
This seems wrong to me: a new PINGREQ should (at least) be sent whenever the send interval elapses, because that's what the broker expects. If both the send and receive intervals are required to be elapsed, PINGREQ sending can be delayed by incoming messages (which appears to be happening in the above trace), which the broker doesn't expect. And indeed, reverting this change seems to fix the problem in our builds. Is this diagnosis correct?
The text was updated successfully, but these errors were encountered:
Ran into this same issue - commenting out the check for lastReceived also fixes the issue for me. I'm using mosquitto as a broker, and it's forcefully disconnecting the client with "Client xxxx has exceeded timeout, disconnecting.".
It's unclear to me if mosquitto is doing the wrong thing (by not resetting the timeout after sending published messages), or if it's this change (which would be correct, if published messages received by the client should reset the timeouts).
Following the upgrade to 1.3.11 our MQTT client programs started sporadically timing out. Looking at the MQTT traces, the problem seems to be that they don't send PINGREQs when expected:
1.3.9:
A new PINGREQ is sent one minute after the previous one, as expected.
1.3.11:
Over a minute passes after the first outbound PUBLISH without a PINGREQ being sent, and so we disconnect.
I dug into the code and found this change: 0465673#diff-c2fc1b46b2f0d41497e77ebac887254227809403266c24de15ff8ad51c3144a8L715
This seems wrong to me: a new PINGREQ should (at least) be sent whenever the send interval elapses, because that's what the broker expects. If both the send and receive intervals are required to be elapsed, PINGREQ sending can be delayed by incoming messages (which appears to be happening in the above trace), which the broker doesn't expect. And indeed, reverting this change seems to fix the problem in our builds. Is this diagnosis correct?
The text was updated successfully, but these errors were encountered: