mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-12 12:50:28 +08:00
fix
This commit is contained in:
@@ -2,6 +2,7 @@ package lower
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
@@ -49,8 +50,7 @@ func (nc *NIC) Start(m *link.Me) {
|
||||
nc.hasstart = true
|
||||
go func() { // 接收到 NIC
|
||||
for nc.hasstart {
|
||||
packet := m.Read()
|
||||
n, err := nc.ifce.Write(packet.Data)
|
||||
n, err := io.Copy(nc.ifce, m)
|
||||
if err != nil {
|
||||
logrus.Errorln("[lower] recv write to nic err:", err)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user