mirror of
https://github.com/netbirdio/netbird
synced 2026-05-13 17:56:23 +02:00
The Receive goroutine could outlive the test and call t.Logf after teardown, panicking with "Log in goroutine after ... has completed". Register a cleanup that waits for the goroutine to exit; ordering is LIFO so it runs after client.Close, which is what unblocks Receive.