1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 23:35:46 +01:00

Fix race in pushConn.

This commit is contained in:
Juliusz Chroboczek 2021-02-02 19:48:50 +01:00
parent 36d6845dc1
commit 73f72c45fc

View file

@ -469,12 +469,13 @@ func pushConnNow(up *rtpUpConnection, g *group.Group, cs []group.Client) {
// pushConn schedules a call to pushConnNow
func pushConn(up *rtpUpConnection, g *group.Group, cs []group.Client) {
up.mu.Lock()
if up.complete() {
up.mu.Unlock()
pushConnNow(up, g, cs)
return
}
up.mu.Lock()
up.pushed = false
up.mu.Unlock()