add more ntp servers (#3890)
* add more ntp servers to improve stability * bump version
This commit is contained in:
parent
e7f5f32298
commit
864b0686d2
|
@ -14,7 +14,7 @@ import (
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// DefaultMaxAllowedFailures defines how many failures will be tolerated.
|
// DefaultMaxAllowedFailures defines how many failures will be tolerated.
|
||||||
DefaultMaxAllowedFailures = 1
|
DefaultMaxAllowedFailures = 4
|
||||||
|
|
||||||
// FastNTPSyncPeriod period between ntp synchronizations before the first
|
// FastNTPSyncPeriod period between ntp synchronizations before the first
|
||||||
// successful connection.
|
// successful connection.
|
||||||
|
@ -31,10 +31,14 @@ const (
|
||||||
// defaultServers will be resolved to the closest available,
|
// defaultServers will be resolved to the closest available,
|
||||||
// and with high probability resolved to the different IPs
|
// and with high probability resolved to the different IPs
|
||||||
var defaultServers = []string{
|
var defaultServers = []string{
|
||||||
"0.pool.ntp.org",
|
"time.apple.com",
|
||||||
"1.pool.ntp.org",
|
"pool.ntp.org",
|
||||||
"2.pool.ntp.org",
|
"time.cloudflare.com",
|
||||||
"3.pool.ntp.org",
|
"time.windows.com",
|
||||||
|
"ntp.neu.edu.cn",
|
||||||
|
"ntp.nict.jp",
|
||||||
|
"amazon.pool.ntp.org",
|
||||||
|
"android.pool.ntp.org",
|
||||||
}
|
}
|
||||||
var errUpdateOffset = errors.New("failed to compute offset")
|
var errUpdateOffset = errors.New("failed to compute offset")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue