mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-19 19:38:40 +00:00

To remove some multi-case selects, we intentionally allowed sends on closed channels (cc23049cd286f137536d011b7840b3be5fdc8cb4). However, we also introduced concurrent sends and closes, which is a data race. This commit fixes the data race. The mutexes here are uncontended, and thus very cheap. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>