1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-23 12:00:34 +08:00
This commit is contained in:
源文雨
2022-05-14 00:19:16 +08:00
parent 998a16ec56
commit 5ceb532b49
2 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ func (l *Link) WriteAndPut(p *head.Packet, istransfer bool) (n int, err error) {
for ; int(totl)-i > int(l.mtu); i += int(l.mtu) {
logrus.Debugln("[link] split frag", i, ":", i+int(l.mtu), ", remain:", int(totl)-i-int(l.mtu))
packet.Data = data[:int(l.mtu)]
cnt, err := l.write(packet, teatype, totl, uint16(uint(i)>>3), istransfer, true)
cnt, err := l.write(packet, teatype, totl, uint16(i>>3), istransfer, true)
n += cnt
if err != nil {
return n, err
@@ -43,7 +43,7 @@ func (l *Link) WriteAndPut(p *head.Packet, istransfer bool) (n int, err error) {
}
packet.Put()
p.Data = data
cnt, err := l.write(p, teatype, totl, uint16(uint(i)>>3), istransfer, false)
cnt, err := l.write(p, teatype, totl, uint16(i>>3), istransfer, false)
p.Put()
n += cnt
return n, err