mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 15:35:41 +00:00
Do not enqueue after stop. (#2457)
Else, that could leak as the process routine may have exited and the entries are not processed anywhere.
This commit is contained in:
@@ -75,8 +75,12 @@ func (oq *OpsQueue) Enqueue(op func()) {
|
||||
oq.lock.Lock()
|
||||
defer oq.lock.Unlock()
|
||||
|
||||
if oq.isStopped {
|
||||
return
|
||||
}
|
||||
|
||||
oq.ops.PushBack(op)
|
||||
if oq.ops.Len() == 1 && !oq.isStopped {
|
||||
if oq.ops.Len() == 1 {
|
||||
select {
|
||||
case oq.wake <- struct{}{}:
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user