1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 07:26:24 -05:00
This commit is contained in:
Darien Raymond 2017-02-26 15:01:50 +01:00
parent f87b0fcde7
commit d2897633a6
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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
if number-v.firstUnacknowledged > 0x7FFFFFFF || number-v.nextNumber < 0x7FFFFFFF {
return false
@ -269,7 +268,7 @@ func (v *SendingWorker) ProcessSegment(current uint32, seg *AckSegment, rto uint
var maxack uint32
var maxackRemoved bool
for _, number := range seg.NumberList {
removed := v.ProcessAck(number)
removed := v.processAck(number)
if maxack < number {
maxack = number
maxackRemoved = removed