1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-12 12:50:28 +08:00

fix recv err in win

This commit is contained in:
fumiama
2021-12-30 13:17:12 +08:00
parent a4036a76bb
commit 4a17d7cf13
4 changed files with 7 additions and 4 deletions

View File

@@ -46,12 +46,12 @@ func (nc *NIC) Start(m *link.Me) {
go func() { // 接收到 NIC
for nc.hasstart {
packet := m.Read()
_, err := nc.ifce.Write(packet.Data)
n, err := nc.ifce.Write(packet.Data)
if err != nil {
logrus.Errorln("[lower] recv write to nic err:", err)
break
}
logrus.Infoln("[lower] recv write", len(packet.Data), "bytes packet to nic")
logrus.Infoln("[lower] recv write", n, "bytes packet to nic")
}
}()
buf := make([]byte, 4096)