summaryrefslogtreecommitdiffstats
path: root/device.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-20 06:19:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-20 06:29:21 +0200
commit1068d6b92b905adef34525fbac37a5af7290f4fa (patch)
tree489aecd3861ff1592d358c8787084e1b89fee036 /device.go
parentAvoid deadlock when the mutex isn't required, since these are atomics (diff)
downloadwireguard-go-1068d6b92b905adef34525fbac37a5af7290f4fa.tar.xz
wireguard-go-1068d6b92b905adef34525fbac37a5af7290f4fa.zip
Give bind its own wait group
In a waitgroup, all waits must come after all adds
Diffstat (limited to 'device.go')
-rw-r--r--device.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/device.go b/device.go
index 6758cbc..7a23350 100644
--- a/device.go
+++ b/device.go
@@ -35,6 +35,8 @@ type Device struct {
}
net struct {
+ starting sync.WaitGroup
+ stopping sync.WaitGroup
mutex sync.RWMutex
bind Bind // bind interface
port uint16 // listening port