mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-04 16:37:12 -05:00
comments
This commit is contained in:
parent
f87b0fcde7
commit
d2897633a6
@ -237,8 +237,7 @@ func (v *SendingWorker) FindFirstUnacknowledged() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private: Visible for testing.
|
func (v *SendingWorker) processAck(number uint32) bool {
|
||||||
func (v *SendingWorker) ProcessAck(number uint32) bool {
|
|
||||||
// number < v.firstUnacknowledged || number >= v.nextNumber
|
// number < v.firstUnacknowledged || number >= v.nextNumber
|
||||||
if number-v.firstUnacknowledged > 0x7FFFFFFF || number-v.nextNumber < 0x7FFFFFFF {
|
if number-v.firstUnacknowledged > 0x7FFFFFFF || number-v.nextNumber < 0x7FFFFFFF {
|
||||||
return false
|
return false
|
||||||
@ -269,7 +268,7 @@ func (v *SendingWorker) ProcessSegment(current uint32, seg *AckSegment, rto uint
|
|||||||
var maxack uint32
|
var maxack uint32
|
||||||
var maxackRemoved bool
|
var maxackRemoved bool
|
||||||
for _, number := range seg.NumberList {
|
for _, number := range seg.NumberList {
|
||||||
removed := v.ProcessAck(number)
|
removed := v.processAck(number)
|
||||||
if maxack < number {
|
if maxack < number {
|
||||||
maxack = number
|
maxack = number
|
||||||
maxackRemoved = removed
|
maxackRemoved = removed
|
||||||
|
Loading…
Reference in New Issue
Block a user