1
0
mirror of https://github.com/bgp/stayrtr.git synced 2024-05-06 15:54:54 +00:00

Refresh faster when the VRPs weren't downloaded on init

This commit is contained in:
Null User
2021-10-26 14:14:55 +00:00
parent 6332b3ee71
commit 76eac7450a

View File

@ -379,6 +379,10 @@ func (s *state) routineUpdate(file string, interval int, slurmFile string) {
signal.Notify(signals, syscall.SIGHUP)
for {
delay := time.NewTimer(time.Duration(interval) * time.Second)
if (s.lastchange.IsZero()) {
log.Warn("Initial sync not complete. Refreshing every 30 seconds")
delay = time.NewTimer(time.Duration(30) * time.Second)
}
select {
case <-delay.C:
case <-signals: