aboutsummaryrefslogtreecommitdiff
path: root/device/tun.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2020-12-10 11:25:08 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2020-12-10 22:37:10 +0100
commit5e92865404f56c6f7f2aaa784d2588f310d2d8a7 (patch)
tree933a4c47443a72e8431ec5155775f93a84ac2314 /device/tun.go
parenta5a9c0db00261b50ef790eb7bb318fc9c1a56aa5 (diff)
downloadwireguard-go-5e92865404f56c6f7f2aaa784d2588f310d2d8a7.tar.gz
wireguard-go-5e92865404f56c6f7f2aaa784d2588f310d2d8a7.zip
device: remove starting waitgroups
In each case, the starting waitgroup did nothing but ensure that the goroutine has launched. Nothing downstream depends on the order in which goroutines launch, and if the Go runtime scheduler is so broken that goroutines don't get launched reasonably promptly, we have much deeper problems. Given all that, simplify the code. Passed a race-enabled stress test 25,000 times without failure. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to '')
-rw-r--r--device/tun.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/device/tun.go b/device/tun.go
index 1f88f33..3816f9b 100644
--- a/device/tun.go
+++ b/device/tun.go
@@ -20,7 +20,6 @@ func (device *Device) RoutineTUNEventReader() {
logError := device.log.Error
logDebug.Println("Routine: event worker - started")
- device.state.starting.Done()
for event := range device.tun.device.Events() {
if event&tun.EventMTUUpdate != 0 {