mirror of https://github.com/v2ray/v2ray-core
locker protected ReceivingQueue.Put
parent
a1f5839461
commit
5680c69146
|
@ -118,6 +118,14 @@ L:
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ReceivingQueue) Put(payload *alloc.Buffer) {
|
func (this *ReceivingQueue) Put(payload *alloc.Buffer) {
|
||||||
|
this.RLock()
|
||||||
|
defer this.RUnlock()
|
||||||
|
|
||||||
|
if this.closed {
|
||||||
|
payload.Release()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.queue <- payload
|
this.queue <- payload
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue