summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2022-07-18 14:19:34 -0500
committerGitHub <noreply@github.com>2022-07-18 14:19:34 -0500
commit7446853d7de28d37af2d9ed4342d6d9da170ec3c (patch)
treecb1e0c9f42c54f89f11f41e8a587958227616de0
parent047b246136ad72cc723b6ab8ccbaab1ecc78c59d (diff)
parent81101af3462d16bcf2ac40a86073346c25988ba5 (diff)
Merge pull request #11640 from FRRouting/mergify/bp/stable/8.3/pr-11631
ldpd: Check if the thread is scheduled before calling for remained time (backport #11631)
-rw-r--r--ldpd/adjacency.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c
index bbc8a277a6..7eb5663492 100644
--- a/ldpd/adjacency.c
+++ b/ldpd/adjacency.c
@@ -386,7 +386,9 @@ adj_to_ctl(struct adj *adj)
}
actl.holdtime = adj->holdtime;
actl.holdtime_remaining =
- thread_timer_remain_second(adj->inactivity_timer);
+ thread_is_scheduled(adj->inactivity_timer)
+ ? thread_timer_remain_second(adj->inactivity_timer)
+ : 0;
actl.trans_addr = adj->trans_addr;
actl.ds_tlv = adj->ds_tlv;