LiamBindle / MQTT-C

A portable MQTT C client for embedded systems and PCs alike.
https://liambindle.ca/MQTT-C
MIT License
775 stars 275 forks source link

Removed * 0.75 to be compliant with documentation #161

Closed ziron4 closed 2 years ago

ziron4 commented 2 years ago

According to oasis-open MQTT documentation: If the Keep Alive value is non-zero and the Server does not receive a Control Packet from the Client within one and a half times the Keep Alive time period, it MUST disconnect the Network Connection to the Client as if the network had failed Link to documentation: http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc385349238

That means the client have up to Keep Alive * 1.5 to send a the keep alive, which should be plenty.

Therefor the client library should not change the interval to less than what the user set.

LiamBindle commented 2 years ago

Good catch @ziron4. I think you're right---that shouldn't be there. Thanks for the contribution!