Close tun device with device

This commit is contained in:
Aurélien Chabot 2017-11-11 12:27:24 +01:00 committed by Mathias Hall-Andersen
parent 32d8932d1b
commit 5705a5e2ef

View File

@ -205,6 +205,7 @@ func (device *Device) Close() {
device.RemoveAllPeers() device.RemoveAllPeers()
close(device.signal.stop) close(device.signal.stop)
closeUDPConn(device) closeUDPConn(device)
device.tun.device.Close()
} }
func (device *Device) WaitChannel() chan struct{} { func (device *Device) WaitChannel() chan struct{} {