Merge pull request #12049 from Sizurka/fix-asymcute-reconnect
asymcute: Reset keepalive counter on connection ACK
This commit is contained in:
commit
bf2aaa1a5d
@ -325,6 +325,7 @@ static void _on_connack(asymcute_con_t *con, const uint8_t *data, size_t len)
|
|||||||
if (data[2] == MQTTSN_ACCEPTED) {
|
if (data[2] == MQTTSN_ACCEPTED) {
|
||||||
con->state = CONNECTED;
|
con->state = CONNECTED;
|
||||||
/* start keep alive timer */
|
/* start keep alive timer */
|
||||||
|
con->keepalive_retry_cnt = ASYMCUTE_N_RETRY;
|
||||||
event_timeout_set(&con->keepalive_timer, KEEPALIVE_TO);
|
event_timeout_set(&con->keepalive_timer, KEEPALIVE_TO);
|
||||||
ret = ASYMCUTE_CONNECTED;
|
ret = ASYMCUTE_CONNECTED;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user