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

repair pipe

This commit is contained in:
fumiama
2021-12-31 20:52:12 +08:00
parent 41b085be20
commit c4de83947b
5 changed files with 13 additions and 24 deletions

View File

@@ -2,6 +2,7 @@ package link
import (
"errors"
"fmt"
"net"
"github.com/sirupsen/logrus"
@@ -143,7 +144,7 @@ func (l *Link) write(p *head.Packet, datasz uint32, offset uint16, istransfer, h
if peerep == nil {
return 0, errors.New("[link] nil endpoint of " + p.Dst.String())
}
logrus.Infoln("[link] write", len(d), "bytes data from ep", l.me.myconn.LocalAddr(), "to", peerep)
logrus.Infoln("[link] write", len(d), "bytes data from ep", l.me.myconn.LocalAddr(), "to", peerep, "offset:", fmt.Sprintf("%04x", offset))
n, err = l.me.myconn.WriteToUDP(d, peerep)
} else {
logrus.Warnln("[link] drop packet: nil peerlink")