Skip to content

Commit 7446853

Browse files
authored
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)
2 parents 047b246 + 81101af commit 7446853

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ldpd/adjacency.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ adj_to_ctl(struct adj *adj)
386386
}
387387
actl.holdtime = adj->holdtime;
388388
actl.holdtime_remaining =
389-
thread_timer_remain_second(adj->inactivity_timer);
389+
thread_is_scheduled(adj->inactivity_timer)
390+
? thread_timer_remain_second(adj->inactivity_timer)
391+
: 0;
390392
actl.trans_addr = adj->trans_addr;
391393
actl.ds_tlv = adj->ds_tlv;
392394

0 commit comments

Comments
 (0)