1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00

Basic tun name behaviour implemented; now figuring out why it won't close

This commit is contained in:
Brady OBrien 2018-05-25 15:21:34 -05:00
parent b0944fd2a1
commit de4c43207b

View File

@ -439,8 +439,8 @@ func (tun *nativeTun) Close() error {
err4 = renameTun(tun.name,tun.origName)
}
err1 := tun.rwcancel.Cancel()
err2 := tun.fd.Close()
err1 := tun.rwcancel.Cancel()
if tun.routeSocket != -1 {
unix.Shutdown(tun.routeSocket, unix.SHUT_RDWR)
err4 = unix.Close(tun.routeSocket)