diff --git a/intra/dialers/ndial.go b/intra/dialers/ndial.go index 7dc431cd..36446b09 100644 --- a/intra/dialers/ndial.go +++ b/intra/dialers/ndial.go @@ -74,8 +74,8 @@ func netdial(d *net.Dialer, network, addr string, connect netConnectFunc) (net.C log.W("ndial: ip %s for %s failed with err %v", ip, addr, err) } - dur := time.Since(start).Seconds() - log.D("ndial: duration: %ds; failed %s", dur*1000, addr) + dur := time.Since(start) + log.D("ndial: duration: %s; failed %s", dur, addr) // xxx: return nil, errNoIps? return d.Dial(network, addr) } diff --git a/intra/dialers/pdial.go b/intra/dialers/pdial.go index ff890195..d56759f0 100644 --- a/intra/dialers/pdial.go +++ b/intra/dialers/pdial.go @@ -84,8 +84,8 @@ func proxydial(d proxy.Dialer, network, addr string, connect proxyConnectFunc) ( log.W("pdial: ip %s for %s failed with err %v", ip, addr, err) } - dur := time.Since(start).Seconds() - log.D("pdial: duration: %ds; failed %s", dur*1000, addr) + dur := time.Since(start) + log.D("pdial: duration: %s; failed %s", dur, addr) // for example, socks5 proxy does not support dialing hostnames return nil, errNoIps diff --git a/intra/dialers/rdial.go b/intra/dialers/rdial.go index a9ea7f98..ed17baec 100644 --- a/intra/dialers/rdial.go +++ b/intra/dialers/rdial.go @@ -106,8 +106,8 @@ func commondial(d *protect.RDial, network, addr string, connect connectFunc) (ne log.W("rdial: commondial: ip %s for %s failed with err %v", ip, addr, err) } - dur := time.Since(start).Seconds() - log.D("rdial: commondial: duration: %ds; failed %s", dur*1000, addr) + dur := time.Since(start) + log.D("rdial: commondial: duration: %s; failed %s", dur, addr) // xxx: return nil, errNoIps return d.Dial(network, addr) } diff --git a/intra/dialers/tlsdial.go b/intra/dialers/tlsdial.go index 37f22621..cf8e847c 100644 --- a/intra/dialers/tlsdial.go +++ b/intra/dialers/tlsdial.go @@ -82,8 +82,8 @@ func tlsdial(d *tls.Dialer, network, addr string, connect tlsConnectFunc) (net.C log.W("tlsdial: ip %s for %s failed with err %v", ip, addr, err) } - dur := time.Since(start).Seconds() - log.D("tlsdial: duration: %ds; failed %s", dur*1000, addr) + dur := time.Since(start) + log.D("tlsdial: duration: %s; failed %s", dur, addr) return nil, errNoIps }