From 4cc7a7a455b0796d6300a6f3ef69e9041ec900d4 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Wed, 25 Nov 2020 12:37:02 +0100 Subject: wintun: keep original error when Wintun session start fails Signed-off-by: Simon Rozman --- tun/tun_windows.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } -- cgit v1.2.3