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

Method peerReadyForHandshakeTimeout

tailnet/configmaps.go:670–689  ·  view source on GitHub ↗
(peerID uuid.UUID)

Source from the content-addressed store, hash-verified

668}
669
670func (c *configMaps) peerReadyForHandshakeTimeout(peerID uuid.UUID) {
671 logger := c.logger.With(slog.F("peer_id", peerID))
672 logger.Debug(context.Background(), "peer ready for handshake timeout")
673 c.L.Lock()
674 defer c.L.Unlock()
675 lc, ok := c.peers[peerID]
676 if !ok {
677 logger.Debug(context.Background(),
678 "ready for handshake timeout triggered for peer that is removed from the map")
679 return
680 }
681
682 wasReady := lc.readyForHandshake
683 lc.readyForHandshake = true
684 if !wasReady {
685 logger.Info(context.Background(), "setting peer ready for handshake after timeout")
686 c.netmapDirty = true
687 c.Broadcast()
688 }
689}
690
691func (*configMaps) nodeKeepalive(lc *peerLifecycle, status *ipnstate.Status, node *tailcfg.Node) bool {
692 // If the peer is already active, keepalives should be enabled.

Callers 1

Calls 3

LockMethod · 0.45
UnlockMethod · 0.45
InfoMethod · 0.45

Tested by

no test coverage detected