tuanpmt / esp_mqtt

MQTT client library for ESP8266
http://tuanpm.net/post/esp_mqtt/
MIT License
1.14k stars 400 forks source link

Put keepAliveTick in more sensible location #140

Closed someburner closed 7 years ago

someburner commented 7 years ago

In short, keepAliveTick should not be reset every time a packet is received, since, for ex, a QoS 0 packet does not require an Ack. So depending on QoS levels used, this will cause the server to disconnect the client due to no control message soon enough. Likely related to #128.

Steps to recreate issue:

#!/bin/bash
SPAM_DELAY=1;
while :
do
   mosquitto_pub -h hostname -t /test/topic -m 'test playload'
   sleep $SPAM_DELAY;
done
someburner commented 7 years ago

@tuanpmt thoughts?

tuanpmt commented 7 years ago

Thank you