maxInFlightConnectionAttemptsPerClient is the same as maxInFlightConnectionAttempts, but applies on a per-client basis (i.e. keyed by the remote Tailscale IP).
()
| 108 | // maxInFlightConnectionAttempts, but applies on a per-client basis |
| 109 | // (i.e. keyed by the remote Tailscale IP). |
| 110 | func 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 | |
| 122 | var debugNetstack = envknob.RegisterBool("TS_DEBUG_NETSTACK") |
| 123 |
no test coverage detected
searching dependent graphs…