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