fix no copying packet in write

This commit is contained in:
fumiama
2021-12-30 13:14:37 +08:00
parent 82646596a4
commit 3d68512108
+1
View File
@@ -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: