1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-29 23:36:25 -04:00

correctly release segments

This commit is contained in:
v2ray 2016-07-13 23:15:40 +02:00
parent 73afe9a001
commit 05ed05b9a0
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
2 changed files with 3 additions and 0 deletions

View File

@ -414,6 +414,7 @@ func (this *Connection) Input(data []byte) int {
}
this.sendingWorker.ProcessReceivingNext(seg.ReceivinNext)
this.receivingWorker.ProcessSendingNext(seg.SendingNext)
seg.Release()
default:
}
}

View File

@ -292,6 +292,8 @@ func (this *SendingWorker) ProcessAck(number uint32) {
}
func (this *SendingWorker) ProcessSegment(current uint32, seg *AckSegment) {
defer seg.Release()
this.Lock()
defer this.Unlock()