marvinroger / async-mqtt-client

📶 An Arduino for ESP8266 asynchronous MQTT client implementation
MIT License
834 stars 266 forks source link

Sending ping too often #38

Closed bertmelis closed 7 years ago

bertmelis commented 7 years ago

It seems like to logic behind the ping and keepalive is buggy. No matter hwat keepalive i set, the ping is always send after 6-8 seconds.

I believe the expected behaviour is to send a PINGREQ after keepalive * 1000 * 0.7.

So if I'd set the keepalive to 120 seconds. I would only expect to see a pingreq/pingresp after 84 seconds.

I'm using the homie-esp8266 code for testing. But I also hardcoded the keepalive value in the mqtt-code as 120 also without result.

bertmelis commented 7 years ago

Nevermind. I found out the keepalive value was hardcoded in homie-esp8266.