mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-26 13:01:59 -08:00
fix race condition
This commit is contained in:
parent
f40f3a34ab
commit
4afe8428c8
2 changed files with 3 additions and 3 deletions
2
path.go
2
path.go
|
|
@ -59,7 +59,7 @@ func (pa *path) log(format string, args ...interface{}) {
|
|||
|
||||
func (pa *path) onInit() {
|
||||
if pa.source != nil {
|
||||
go pa.source.run()
|
||||
go pa.source.run(pa.source.state)
|
||||
}
|
||||
|
||||
if pa.confp.RunOnInit != "" {
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ func newSource(p *program, path *path, confp *confPath) *source {
|
|||
|
||||
func (s *source) isPublisher() {}
|
||||
|
||||
func (s *source) run() {
|
||||
s.applyState(s.state)
|
||||
func (s *source) run(initialState sourceState) {
|
||||
s.applyState(initialState)
|
||||
|
||||
outer:
|
||||
for {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue