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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user