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

Function maxInFlightConnectionAttemptsPerClient

wgengine/netstack/netstack.go:110–120  ·  view source on GitHub ↗

maxInFlightConnectionAttemptsPerClient is the same as maxInFlightConnectionAttempts, but applies on a per-client basis (i.e. keyed by the remote Tailscale IP).

()

Source from the content-addressed store, hash-verified

108// maxInFlightConnectionAttempts, but applies on a per-client basis
109// (i.e. keyed by the remote Tailscale IP).
110func maxInFlightConnectionAttemptsPerClient() int {
111 if n := maxInFlightConnectionAttemptsPerClientForTest.Load(); n > 0 {
112 return int(n)
113 }
114
115 // For now, allow each individual client at most 2/3rds of the global
116 // limit. On all platforms except mobile, this won't be a visible
117 // change for users since this limit was added at the same time as we
118 // bumped the global limit, above.
119 return maxInFlightConnectionAttempts() * 2 / 3
120}
121
122var debugNetstack = envknob.RegisterBool("TS_DEBUG_NETSTACK")
123

Callers 2

ExpVarMethod · 0.85

Calls 2

LoadMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…