This commit is contained in:
Jack M. 2025-02-11 20:17:02 +01:00 committed by GitHub
commit 5aeb4fafd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

2
ntp.go
View File

@ -20,6 +20,8 @@ func TimeSyncLoop() {
err := SyncSystemTime() err := SyncSystemTime()
if err != nil { if err != nil {
log.Printf("Failed to sync system time: %v", err) log.Printf("Failed to sync system time: %v", err)
// Sync failed for all 4 endpoints, likely network issue, wait for 1 hour before retrying
time.Sleep(1 * time.Hour)
continue continue
} }
log.Printf("Time sync successful, now is: %v, time taken: %v", time.Now(), time.Since(start)) log.Printf("Time sync successful, now is: %v, time taken: %v", time.Now(), time.Since(start))