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
|
// prepare signals
|
||||||
|
|
||||||
device.signals.stop = make(chan struct{}, 0)
|
device.signals.stop = make(chan struct{})
|
||||||
|
|
||||||
// prepare net
|
// prepare net
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ func CreateTUNFromFile(file *os.File) (TUNDevice, error) {
|
||||||
mtu: 1500,
|
mtu: 1500,
|
||||||
events: make(chan TUNEvent, 10),
|
events: make(chan TUNEvent, 10),
|
||||||
errors: make(chan error, 1),
|
errors: make(chan error, 1),
|
||||||
statusListenersShutdown: make(chan struct{}, 0),
|
statusListenersShutdown: make(chan struct{}),
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := tun.Name()
|
_, err := tun.Name()
|
||||||
|
|
|
@ -399,7 +399,7 @@ func CreateTUNFromFile(fd *os.File) (TUNDevice, error) {
|
||||||
fd: fd,
|
fd: fd,
|
||||||
events: make(chan TUNEvent, 5),
|
events: make(chan TUNEvent, 5),
|
||||||
errors: make(chan error, 5),
|
errors: make(chan error, 5),
|
||||||
statusListenersShutdown: make(chan struct{}, 0),
|
statusListenersShutdown: make(chan struct{}),
|
||||||
nopi: false,
|
nopi: false,
|
||||||
}
|
}
|
||||||
var err error
|
var err error
|
||||||
|
|
Loading…
Reference in a new issue