AtherEnergy / rumqtt

Pure rust mqtt cilent
The Unlicense
202 stars 71 forks source link

Pings should happen when there are only incoming QoS 0 publishes #162

Closed tekjar closed 5 years ago

tekjar commented 5 years ago

Ping timer is now solely based on incoming network stream timeout. When there is a constant stream of incoming qos0 publishes, the ping will never fire even though there aren't any outgoing messages

Option 1: Starting a new concurrent timer.

This has its own set of timing issues if the timer isn't reset based on incoming and outgoing packets.

Option 2: Also start pings based on outgoing requests and coordinate between incoming and outgoing timeout pings to not mess up due to previous ping state

tekjar commented 5 years ago

Combining incoming timeout with reply timeout fixes this #163