mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-18 07:17:32 -05:00
shrink buf for all type of segments
This commit is contained in:
parent
812ac54290
commit
313b3c1db0
@ -324,7 +324,6 @@ func (kcp *KCP) Input(data []byte) int {
|
|||||||
case *DataSegment:
|
case *DataSegment:
|
||||||
kcp.HandleOption(seg.Opt)
|
kcp.HandleOption(seg.Opt)
|
||||||
kcp.HandleSendingNext(seg.SendingNext)
|
kcp.HandleSendingNext(seg.SendingNext)
|
||||||
kcp.shrink_buf()
|
|
||||||
kcp.acklist.Add(seg.Number, seg.Timestamp)
|
kcp.acklist.Add(seg.Number, seg.Timestamp)
|
||||||
kcp.parse_data(seg)
|
kcp.parse_data(seg)
|
||||||
kcp.lastPayloadTime = kcp.current
|
kcp.lastPayloadTime = kcp.current
|
||||||
@ -348,7 +347,6 @@ func (kcp *KCP) Input(data []byte) int {
|
|||||||
maxack = sn
|
maxack = sn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kcp.shrink_buf()
|
|
||||||
kcp.lastPayloadTime = kcp.current
|
kcp.lastPayloadTime = kcp.current
|
||||||
case *CmdOnlySegment:
|
case *CmdOnlySegment:
|
||||||
kcp.HandleOption(seg.Opt)
|
kcp.HandleOption(seg.Opt)
|
||||||
@ -367,6 +365,7 @@ func (kcp *KCP) Input(data []byte) int {
|
|||||||
kcp.HandleSendingNext(seg.SendingNext)
|
kcp.HandleSendingNext(seg.SendingNext)
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
kcp.shrink_buf()
|
||||||
}
|
}
|
||||||
|
|
||||||
if flag != 0 {
|
if flag != 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user