mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
Merge pull request #2032 from simonduq/pr/tsch-ka-fix
TSCH bugfix: reset keep-alive timeout when switching time source
This commit is contained in:
commit
bfef0b5d6a
@ -163,6 +163,13 @@ tsch_queue_update_time_source(const linkaddr_t *new_addr)
|
||||
/* Update time source */
|
||||
if(new_time_src != NULL) {
|
||||
new_time_src->is_time_source = 1;
|
||||
/* (Re)set keep-alive timeout */
|
||||
tsch_set_ka_timeout(TSCH_KEEPALIVE_TIMEOUT);
|
||||
/* Start sending keepalives */
|
||||
tsch_schedule_keepalive();
|
||||
} else {
|
||||
/* Stop sending keepalives */
|
||||
tsch_set_ka_timeout(0);
|
||||
}
|
||||
|
||||
if(old_time_src != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user