]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
Close tun device with device
authorAurélien Chabot <aurelien@chabot.fr>
Sat, 11 Nov 2017 11:27:24 +0000 (12:27 +0100)
committerMathias Hall-Andersen <mathias@hall-andersen.dk>
Sat, 11 Nov 2017 11:27:24 +0000 (12:27 +0100)
src/device.go

index 61c87bc99d7fda370384906c7e76a6fcbe67781c..8567a369b5bec2a85a5b1d15332baae9be74f0c8 100644 (file)
@@ -205,6 +205,7 @@ func (device *Device) Close() {
        device.RemoveAllPeers()
        close(device.signal.stop)
        closeUDPConn(device)
+       device.tun.device.Close()
 }
 
 func (device *Device) WaitChannel() chan struct{} {