Skip to content

Commit

Permalink
Merge pull request #1355 from michelepra/concurrent_map_fix
Browse files Browse the repository at this point in the history
data race for streams map
  • Loading branch information
AlexxIT authored Sep 27, 2024
2 parents 7b77e41 + 388c408 commit ef7d898
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/streams/streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ func New(name string, source string) *Stream {
}

stream := NewStream(source)

streamsMu.Lock()
streams[name] = stream
streamsMu.Unlock()
return stream
}

Expand Down

0 comments on commit ef7d898

Please sign in to comment.