summaryrefslogtreecommitdiffhomepage
path: root/tun
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-11-25 12:37:02 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-25 13:57:05 +0100
commit4cc7a7a455b0796d6300a6f3ef69e9041ec900d4 (patch)
tree54a154361593419eb8bc43340cef485c278508d5 /tun
parentda19db415a588e72fb8b13e5b5aa0b97db7cc30b (diff)
wintun: keep original error when Wintun session start fails
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun')
-rw-r--r--tun/tun_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/tun_windows.go b/tun/tun_windows.go
index e949c05..a132d06 100644
--- a/tun/tun_windows.go
+++ b/tun/tun_windows.go
@@ -104,7 +104,7 @@ func CreateTUNWithRequestedGUID(ifname string, requestedGUID *windows.GUID, mtu
tun.session, err = wt.StartSession(0x800000) // Ring capacity, 8 MiB
if err != nil {
- _, err = tun.wt.Delete(false)
+ tun.wt.Delete(false)
close(tun.events)
return nil, fmt.Errorf("Error starting session: %w", err)
}