1
0
mirror of https://github.com/fumiama/water.git synced 2026-06-05 02:00:29 +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 {
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
}