Move "refreshing certificates" to debug, display RTT even for 1 server

This commit is contained in:
Frank Denis 2018-01-30 23:50:42 +01:00
parent b741a62aab
commit 76e5a99a5c
1 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ func (serversInfo *ServersInfo) refreshServer(proxy *Proxy, name string, stamp S
}
func (serversInfo *ServersInfo) refresh(proxy *Proxy) (int, error) {
dlog.Infof("Refreshing certificates")
dlog.Debug("Refreshing certificates")
serversInfo.RLock()
registeredServers := serversInfo.registeredServers
serversInfo.RUnlock()
@ -116,7 +116,7 @@ func (serversInfo *ServersInfo) refresh(proxy *Proxy) (int, error) {
}
}
serversInfo.inner = inner
if innerLen > 1 {
if innerLen > 0 {
dlog.Noticef("Server with the lowest initial latency: %s (rtt: %dms)", inner[0].Name, inner[0].initialRtt)
proxy.certIgnoreTimestamp = false
}