mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
18910cf4e2
When a keepalive timeout occurs keepalive_retry_cnt remains zero, so when the connection is re-established _on_keepalive_evt will immediately disconnect instead of actually sending a keepalive ping. The sequence looks like: 1. _on_connack: start con->keepalive_timer 2. Server does not respond to keepalive pings 3. _on_keepalive_evt: con->keepalive_retry_cnt reaches zero 4. Connection torn down and ASYMCUTE_DISCONNECTED sent to application 5. Application starts reconnection 6. _on_connack: start con->keepalive_timer again 7. First _on_keepalive_evt: con->keepalive_retry_cnt is still zero 8. Repeat from 4. So this simply resets keepalive_retry_cnt in _on_connack when the keepalive timer is restarted. It's a new connection, so resetting the keepalive retry counter make senses regardless. Signed-off-by: Derek Hageman <hageman@inthat.cloud> |
||
---|---|---|
.. | ||
asymcute.c | ||
Makefile |