mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-03 07:56:42 -05:00
remove segment.rto
This commit is contained in:
parent
15f190d268
commit
87e1d66ff0
@ -104,7 +104,6 @@ type Segment struct {
|
||||
sn uint32
|
||||
una uint32
|
||||
resendts uint32
|
||||
rto uint32
|
||||
fastack uint32
|
||||
xmit uint32
|
||||
data *alloc.Buffer
|
||||
@ -614,7 +613,6 @@ func (kcp *KCP) flush() {
|
||||
newseg.sn = kcp.snd_nxt
|
||||
newseg.una = kcp.rcv_nxt
|
||||
newseg.resendts = current
|
||||
newseg.rto = kcp.rx_rto
|
||||
newseg.fastack = 0
|
||||
newseg.xmit = 0
|
||||
kcp.snd_buf = append(kcp.snd_buf, newseg)
|
||||
@ -635,20 +633,18 @@ func (kcp *KCP) flush() {
|
||||
if segment.xmit == 0 {
|
||||
needsend = true
|
||||
segment.xmit++
|
||||
segment.rto = kcp.rx_rto
|
||||
segment.resendts = current + segment.rto + kcp.interval
|
||||
segment.resendts = current + kcp.rx_rto + kcp.interval
|
||||
} else if _itimediff(current, segment.resendts) >= 0 {
|
||||
needsend = true
|
||||
segment.xmit++
|
||||
kcp.xmit++
|
||||
segment.rto += kcp.rx_rto
|
||||
segment.resendts = current + segment.rto + kcp.interval
|
||||
segment.resendts = current + kcp.rx_rto + kcp.interval
|
||||
//lost = true
|
||||
} else if segment.fastack >= resent {
|
||||
needsend = true
|
||||
segment.xmit++
|
||||
segment.fastack = 0
|
||||
segment.resendts = current + segment.rto + kcp.interval
|
||||
segment.resendts = current + kcp.rx_rto + kcp.interval
|
||||
change++
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user