mirror of
https://github.com/fumiama/water.git
synced 2026-06-23 12:40:40 +08:00
rm lock
This commit is contained in:
@@ -290,7 +290,6 @@ type wintunRWC struct {
|
|||||||
ad wintun.Adapter
|
ad wintun.Adapter
|
||||||
s wintun.Session
|
s wintun.Session
|
||||||
readwait windows.Handle
|
readwait windows.Handle
|
||||||
readmu sync.Mutex
|
|
||||||
readbuf []byte
|
readbuf []byte
|
||||||
isclosed bool
|
isclosed bool
|
||||||
}
|
}
|
||||||
@@ -318,9 +317,6 @@ func (w *wintunRWC) Write(b []byte) (int, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w *wintunRWC) Read(b []byte) (int, error) {
|
func (w *wintunRWC) Read(b []byte) (int, error) {
|
||||||
w.readmu.Lock()
|
|
||||||
defer w.readmu.Unlock()
|
|
||||||
|
|
||||||
n := 0
|
n := 0
|
||||||
|
|
||||||
if w.readbuf != nil {
|
if w.readbuf != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user