Shorthand for empty channels
This commit is contained in:
parent
b76ab82539
commit
25df2e6942
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user