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

Method setLostTimer

tailnet/configmaps.go:731–742  ·  view source on GitHub ↗
(c *configMaps)

Source from the content-addressed store, hash-verified

729}
730
731func (l *peerLifecycle) setLostTimer(c *configMaps) {
732 if l.lostTimer != nil {
733 l.lostTimer.Stop()
734 }
735 ttl := lostTimeout - c.clock.Since(l.lastHandshake)
736 if ttl <= 0 {
737 ttl = time.Nanosecond
738 }
739 l.lostTimer = c.clock.AfterFunc(ttl, func() {
740 c.peerLostTimeout(l.peerID)
741 })
742}
743
744const readyForHandshakeTimeout = 5 * time.Second
745

Callers 3

updatePeerLockedMethod · 0.80
setAllPeersLostMethod · 0.80
peerLostTimeoutMethod · 0.80

Calls 2

peerLostTimeoutMethod · 0.80
StopMethod · 0.65

Tested by

no test coverage detected