From da391938d6ac38d57b768cf08375c83ba2bd4b3e Mon Sep 17 00:00:00 2001 From: fumiama Date: Fri, 31 Dec 2021 21:40:27 +0800 Subject: [PATCH] fix err judge --- syscalls_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syscalls_windows.go b/syscalls_windows.go index 25268f4..4eecaec 100644 --- a/syscalls_windows.go +++ b/syscalls_windows.go @@ -324,7 +324,7 @@ func (rate *rateJuggler) update(packetLen uint64) { } type wintunRWC struct { - ad wintun.Adapter + ad *wintun.Adapter s wintun.Session rate rateJuggler readwait windows.Handle @@ -450,5 +450,5 @@ func openDev(config Config) (ifce *Interface, err error) { ad.Close() return } - return &Interface{ReadWriteCloser: &wintunRWC{s: s, ad: *ad, readwait: s.ReadWaitEvent()}, name: config.InterfaceName}, nil + return &Interface{ReadWriteCloser: &wintunRWC{s: s, ad: ad, readwait: s.ReadWaitEvent()}, name: config.InterfaceName}, nil }