MCPcopy Index your code
hub / github.com/tailscale/tailscale / decrementInFlightTCPForward

Method decrementInFlightTCPForward

wgengine/netstack/netstack.go:605–619  ·  view source on GitHub ↗
(tei stack.TransportEndpointID, remoteAddr netip.Addr)

Source from the content-addressed store, hash-verified

603}
604
605func (ns *Impl) decrementInFlightTCPForward(tei stack.TransportEndpointID, remoteAddr netip.Addr) {
606 ns.mu.Lock()
607 defer ns.mu.Unlock()
608
609 // Remove this packet so future SYNs from this address will be handled.
610 delete(ns.packetsInFlight, tei)
611
612 was := ns.connsInFlightByClient[remoteAddr]
613 newVal := was - 1
614 if newVal == 0 {
615 delete(ns.connsInFlightByClient, remoteAddr) // free up space in the map
616 } else {
617 ns.connsInFlightByClient[remoteAddr] = newVal
618 }
619}
620
621// LocalBackend is a fake name for *ipnlocal.LocalBackend to avoid an import cycle.
622type LocalBackend = any

Callers 1

acceptTCPMethod · 0.95

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected