Ensure go routines can exit

This commit is contained in:
Jason A. Donenfeld
2018-05-14 02:14:33 +02:00
parent 29b0453cf1
commit 659106bd6d
2 changed files with 52 additions and 49 deletions

View File

@ -293,7 +293,7 @@ func NewDevice(tun TUNDevice, logger *Logger) *Device {
// prepare signals
device.signals.stop = make(chan struct{}, 1)
device.signals.stop = make(chan struct{}, 0)
// prepare net