mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-12 17:59:06 +02:00
Start took a start context but ran auth.NewAuth and Login on a context derived from Background, so the timeout only began to apply once authentication had already returned. Both calls retry, and a management endpoint that accepts connections but never completes a stream gives them nothing of their own to time out against, so a client could sit in startup indefinitely with the caller's deadline ignored. A process running many clients behind a bounded start concurrency loses more than one client to this: the stalled starts hold every slot, and the rest never launch at all. Observed with 50 clients against a rate-limiting endpoint, where seven came up, ten held the slots, and the remaining thirty-three never started. Neither call outlives startup, so moving them onto startCtx changes nothing about the running client's lifetime.