Skip to content

Commit

Permalink
fix lock
Browse files Browse the repository at this point in the history
Former-commit-id: 130cdc9db7e76fb95165da3e8e4f3f952c79acdd [formerly 1abd035301c63532552fd7c085116ff367fb388c] [formerly 1f6bdc99b587148ca1d151abc96035810c554319 [formerly 7a034d4]]
Former-commit-id: 3a972348cebf7105ac2329e83ead0ab2d92f188e [formerly bdb9e41fef9748a0ed5590b7cc5b0a6f19568c79]
Former-commit-id: 5ed8c67d6a2dc6f8ea2d2d0946e8918740f64bf5
  • Loading branch information
notedit committed Apr 22, 2019
1 parent 3deceb3 commit 393d89d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions incomingstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,12 @@ func (i *IncomingStream) Stop() {
return
}

i.Lock()
for k, track := range i.tracks {
track.Stop()
i.Lock()
delete(i.tracks, k)
i.Unlock()
}
i.Unlock()

for _, stopFunc := range i.onStopListeners {
stopFunc()
Expand Down

0 comments on commit 393d89d

Please sign in to comment.