mirror of https://github.com/jetkvm/kvm.git
PR adjustments.
Removed google, AWS, Apple, Microsoft, and AWS from the default NTP servers (leaving us with pool.ntp.org and time.cloudflare.com). Added http://pool.ntp.org and http://microsoft.com to the HTTP fall-back servers (after testing they will send a Date response header.
This commit is contained in:
parent
64421caa7f
commit
9ee6c39178
7
ntp.go
7
ntp.go
|
@ -24,10 +24,6 @@ var (
|
||||||
defaultNTPServers = []string{
|
defaultNTPServers = []string{
|
||||||
"pool.ntp.org",
|
"pool.ntp.org",
|
||||||
"time.cloudflare.com",
|
"time.cloudflare.com",
|
||||||
"time.google.com",
|
|
||||||
"time.aws.com",
|
|
||||||
"time.apple.com",
|
|
||||||
"time.windows.com",
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -98,8 +94,9 @@ func queryNetworkTime() (*time.Time, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
httpUrls := []string{
|
httpUrls := []string{
|
||||||
|
"http://pool.ntp.org",
|
||||||
"http://apple.com",
|
"http://apple.com",
|
||||||
"http://cloudflare.com",
|
"http://microsoft.com",
|
||||||
}
|
}
|
||||||
for _, url := range httpUrls {
|
for _, url := range httpUrls {
|
||||||
now, err := queryHttpTime(url, timeSyncTimeout)
|
now, err := queryHttpTime(url, timeSyncTimeout)
|
||||||
|
|
Loading…
Reference in New Issue