From 5b0c5b7007f0da5850e0de9e6bc4dc4eafed5381 Mon Sep 17 00:00:00 2001 From: Tim van der Lee Date: Thu, 22 Mar 2018 16:23:31 +0100 Subject: [PATCH] Changed keepalive callback to avoid sending immediate keepalive when the network is congested --- os/net/mac/tsch/tsch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/net/mac/tsch/tsch.c b/os/net/mac/tsch/tsch.c index 9d0affb8a..1dc0bbc7c 100644 --- a/os/net/mac/tsch/tsch.c +++ b/os/net/mac/tsch/tsch.c @@ -275,7 +275,7 @@ keepalive_packet_sent(void *ptr, int status, int transmissions) LOG_INFO_(", st %d-%d\n", status, transmissions); /* We got no ack, try to recover by switching to the last neighbor we received an EB from */ - if(status != MAC_TX_OK) { + if(status == MAC_TX_NOACK) { if(linkaddr_cmp(&last_eb_nbr_addr, &linkaddr_null)) { LOG_WARN("not able to re-synchronize, received no EB from other neighbors\n"); if(sync_count == 0) {