mirror of
https://github.com/fumiama/water
synced 2026-04-22 23:17:20 +08:00
fix no copying packet in write
This commit is contained in:
@@ -305,6 +305,7 @@ func (w *wintunRWC) Write(b []byte) (int, error) {
|
||||
packet, err := w.s.AllocateSendPacket(len(b))
|
||||
switch err {
|
||||
case nil:
|
||||
copy(packet, b)
|
||||
w.s.SendPacket(packet)
|
||||
return len(b), nil
|
||||
case windows.ERROR_HANDLE_EOF:
|
||||
|
||||
Reference in New Issue
Block a user