kopia lustrzana https://github.com/martin-ger/esp_mqtt
Fix keepalive time error.Made keepalive interval half of keepalive time.
This can prevent abnormal disconnect.develop
rodzic
c1ac44a083
commit
65bf3adc2a
mqtt
|
@ -434,7 +434,7 @@ void ICACHE_FLASH_ATTR mqtt_timer(void *arg)
|
|||
|
||||
if (client->connState == MQTT_DATA) {
|
||||
client->keepAliveTick ++;
|
||||
if (client->keepAliveTick > client->mqtt_state.connect_info->keepalive) {
|
||||
if (client->keepAliveTick > (client->mqtt_state.connect_info->keepalive / 2)) {
|
||||
client->connState = MQTT_KEEPALIVE_SEND;
|
||||
system_os_post(MQTT_TASK_PRIO, 0, (os_param_t)client);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue