mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-03 11:22:37 +02:00
fix-races.
This commit is contained in:
parent
89ba775a71
commit
f32e7e7075
4 changed files with 44 additions and 24 deletions
|
@ -219,13 +219,14 @@ func (manager *StreamSinkManagerCtx) createPipeline() error {
|
|||
manager.pipeline.Play()
|
||||
|
||||
manager.wg.Add(1)
|
||||
pipeline := manager.pipeline
|
||||
|
||||
go func() {
|
||||
manager.logger.Debug().Msg("started emitting samples")
|
||||
defer manager.wg.Done()
|
||||
|
||||
for {
|
||||
sample, ok := <-manager.pipeline.Sample
|
||||
sample, ok := <-pipeline.Sample
|
||||
if !ok {
|
||||
manager.logger.Debug().Msg("stopped emitting samples")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue