1
0
mirror of https://github.com/fumiama/water.git synced 2026-06-18 09:40:42 +08:00

fix err judge

This commit is contained in:
fumiama
2021-12-31 21:40:27 +08:00
parent 69e328bbf2
commit da391938d6

View File

@@ -324,7 +324,7 @@ func (rate *rateJuggler) update(packetLen uint64) {
} }
type wintunRWC struct { type wintunRWC struct {
ad wintun.Adapter ad *wintun.Adapter
s wintun.Session s wintun.Session
rate rateJuggler rate rateJuggler
readwait windows.Handle readwait windows.Handle
@@ -450,5 +450,5 @@ func openDev(config Config) (ifce *Interface, err error) {
ad.Close() ad.Close()
return 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
} }