wintun: keep original error when Wintun session start fails
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
da19db415a
commit
4cc7a7a455
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user