MCPcopy Index your code
hub / github.com/coder/coder / netStatusLoop

Method netStatusLoop

vpn/tunnel.go:586–599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

584}
585
586func (u *updater) netStatusLoop() {
587 ticker := u.clock.NewTicker(netStatusInterval)
588 defer ticker.Stop()
589 defer close(u.netLoopDone)
590 for {
591 select {
592 case <-u.ctx.Done():
593 return
594 case <-ticker.C:
595 u.recordLatencies()
596 u.sendAgentUpdate()
597 }
598 }
599}
600
601func (u *updater) recordLatencies() {
602 var agentsIDsToPing []uuid.UUID

Callers 1

NewTunnelFunction · 0.80

Calls 4

recordLatenciesMethod · 0.95
sendAgentUpdateMethod · 0.95
StopMethod · 0.65
DoneMethod · 0.45

Tested by

no test coverage detected