mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-06 00:57:23 +08:00
Close tun fd when bringing down tunnel
This commit is contained in:
@@ -283,7 +283,7 @@ func (tun *NativeTun) Events() chan TUNEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (tun *NativeTun) Close() error {
|
func (tun *NativeTun) Close() error {
|
||||||
return nil
|
return tun.fd.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreateTUNFromFile(name string, fd *os.File) (TUNDevice, error) {
|
func CreateTUNFromFile(name string, fd *os.File) (TUNDevice, error) {
|
||||||
|
Reference in New Issue
Block a user