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
Use case is a client connected to the broker without sending a lot of messages.
Typically the client will send out a keep-alive ping (MQTTPINGREQ) to the broker and the broker will reply to it with a MQTTPINGRESP
However if the broker sends out such a MQTTPINGREQ first, the client replies with a MQTTPINGRESP but doesn't set the lastOutActivity.
I assume the broker may not reply to a MQTTPINGREQ if it is sent very shortly after the last keep-alive (requested by the broker) was dealt with and acknowledged.
These kind of disconnects seem to happen mainly recently as I got quite a few reports lately where it seemed to be "fixed" by sending out more messages to keep within this keep-alive interval.
So I assume there are some MQTT brokers out there which may have implemented such a rate-limiter feature (or only now enabled by default?) on keep-alive pings.
Use case is a client connected to the broker without sending a lot of messages.
Typically the client will send out a keep-alive ping (
MQTTPINGREQ
) to the broker and the broker will reply to it with aMQTTPINGRESP
However if the broker sends out such a
MQTTPINGREQ
first, the client replies with aMQTTPINGRESP
but doesn't set thelastOutActivity
.I assume the broker may not reply to a
MQTTPINGREQ
if it is sent very shortly after the last keep-alive (requested by the broker) was dealt with and acknowledged.These kind of disconnects seem to happen mainly recently as I got quite a few reports lately where it seemed to be "fixed" by sending out more messages to keep within this keep-alive interval.
So I assume there are some MQTT brokers out there which may have implemented such a rate-limiter feature (or only now enabled by default?) on keep-alive pings.
See:
pubsubclient/src/PubSubClient.cpp
Lines 419 to 423 in 2d228f2
Suggested fix:
N.B. the same issue here, when
MQTT_MAX_TRANSFER_SIZE
is definedpubsubclient/src/PubSubClient.cpp
Lines 581 to 603 in 2d228f2
Suggested fix:
The text was updated successfully, but these errors were encountered: