Skip to content

Commit 2c4cb90

Browse files
committed
Un-export ICMP failed field
1 parent e56ed18 commit 2c4cb90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

defs/server.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ type Server struct {
3131
SponsorName string `json:"sponsorName"`
3232
SponsorURL string `json:"sponsorURL"`
3333

34-
ICMPFail bool `json:"-"`
35-
TLog TelemetryLog `json:"-"`
34+
icmpFailed bool `json:"-"`
35+
TLog TelemetryLog `json:"-"`
3636
}
3737

3838
// IsUp checks the speed test backend is up by accessing the ping URL
@@ -62,7 +62,7 @@ func (s *Server) ICMPPingAndJitter(count int, srcIp, network string) (float64, f
6262
s.TLog.Logf("ICMP ping took %s", time.Now().Sub(t).String())
6363
}()
6464

65-
if s.ICMPFail {
65+
if s.icmpFailed {
6666
log.Debug("ICMP ping failed already, using HTTP ping")
6767
return s.PingAndJitter(count + 2)
6868
}
@@ -111,7 +111,7 @@ func (s *Server) ICMPPingAndJitter(count int, srcIp, network string) (float64, f
111111
}
112112

113113
if len(stats.Rtts) == 0 {
114-
s.ICMPFail = true
114+
s.icmpFailed = true
115115
log.Debugf("No ICMP pings returned for server %s (%s), trying TCP ping", s.Name, u.Hostname())
116116
return s.PingAndJitter(count + 2)
117117
}

0 commit comments

Comments
 (0)