summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-05-14 04:19:25 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-05-14 04:19:25 +0200
commit25df2e6942b6fc2066d76b672956cb480affad11 (patch)
tree47a92d8c02ce0f8e6b394a8dce007e65b52fd3bd
parentb76ab82539ddaceefdb095a0959e52a66075fc0e (diff)
downloadwireguard-go-25df2e6942b6fc2066d76b672956cb480affad11.tar.gz
wireguard-go-25df2e6942b6fc2066d76b672956cb480affad11.zip
Shorthand for empty channels
-rw-r--r--device.go2
-rw-r--r--tun_darwin.go2
-rw-r--r--tun_linux.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/device.go b/device.go
index 08a6471..835a755 100644
--- a/device.go
+++ b/device.go
@@ -293,7 +293,7 @@ func NewDevice(tun TUNDevice, logger *Logger) *Device {
// prepare signals
- device.signals.stop = make(chan struct{}, 0)
+ device.signals.stop = make(chan struct{})
// prepare net
diff --git a/tun_darwin.go b/tun_darwin.go
index 97668cf..b212e57 100644
--- a/tun_darwin.go
+++ b/tun_darwin.go
@@ -117,7 +117,7 @@ func CreateTUNFromFile(file *os.File) (TUNDevice, error) {
mtu: 1500,
events: make(chan TUNEvent, 10),
errors: make(chan error, 1),
- statusListenersShutdown: make(chan struct{}, 0),
+ statusListenersShutdown: make(chan struct{}),
}
_, err := tun.Name()
diff --git a/tun_linux.go b/tun_linux.go
index a243a03..18fb72c 100644
--- a/tun_linux.go
+++ b/tun_linux.go
@@ -399,7 +399,7 @@ func CreateTUNFromFile(fd *os.File) (TUNDevice, error) {
fd: fd,
events: make(chan TUNEvent, 5),
errors: make(chan error, 5),
- statusListenersShutdown: make(chan struct{}, 0),
+ statusListenersShutdown: make(chan struct{}),
nopi: false,
}
var err error