MCPcopy
hub / github.com/windtf/wireproxy / StartPingIPs

Method StartPingIPs

routine.go:472–485  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

470}
471
472func (d VirtualTun) StartPingIPs() {
473 d.PingRecordLock.Lock()
474 for _, addr := range d.Conf.CheckAlive {
475 d.PingRecord[addr.String()] = 0
476 }
477 d.PingRecordLock.Unlock()
478
479 go func() {
480 for {
481 d.pingIPs()
482 time.Sleep(time.Duration(d.Conf.CheckAliveInterval) * time.Second)
483 }
484 }()
485}

Callers 1

mainFunction · 0.80

Calls 1

pingIPsMethod · 0.95

Tested by

no test coverage detected