hivemq / hivemq-mqtt-client

HiveMQ MQTT Client is an MQTT 5.0 and MQTT 3.1.1 compatible and feature-rich high-performance Java client library with different API flavours and backpressure support
https://hivemq.github.io/hivemq-mqtt-client/
Apache License 2.0
824 stars 153 forks source link

Improve PINGREQ <--> PINGRESP reliability during network change #623

Open pglombardo opened 4 months ago

pglombardo commented 4 months ago

🚀 Feature Request

With TCP being a stateful connection, for any PINGREQ sent, we expect a PINGRESP to be returned. This logic breaks when there is a network change between REQ & RESP.

The client should allow some ping responses to be discarded and instead retry the ping again.

This issue was pointed out in #508.

The code in question: MqttPingHandler.java

🔈 Motivation

🛰 Alternatives

📎 Additional context