Skip to content

Commit

Permalink
ensure concurrency updated even without instance
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Dec 15, 2024
1 parent 99d9528 commit 876534a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions proxy/proxy_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ func (instance *StreamInstance) ProxyStream(ctx context.Context, m3uIndex int, r
return
}

instance.Cm.UpdateConcurrency(m3uIndex, true)
defer instance.Cm.UpdateConcurrency(m3uIndex, false)
cm := instance.Cm

cm.UpdateConcurrency(m3uIndex, true)

defer func() {
cm.UpdateConcurrency(m3uIndex, false)

buffer = nil
if flusher, ok := w.(http.Flusher); ok {
flusher.Flush()
Expand Down

0 comments on commit 876534a

Please sign in to comment.