Fix deadlock in events service
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
parent
5ea5fbdfc5
commit
e3fcde6934
@ -47,7 +47,9 @@ func (e *Emitter) Events(ctx context.Context, clientID string) chan *events.Enve
|
|||||||
ns: ns,
|
ns: ns,
|
||||||
}
|
}
|
||||||
e.sinks[clientID] = s
|
e.sinks[clientID] = s
|
||||||
|
e.m.Unlock()
|
||||||
e.broadcaster.Add(s)
|
e.broadcaster.Add(s)
|
||||||
|
return s.ch
|
||||||
}
|
}
|
||||||
ch := e.sinks[clientID].ch
|
ch := e.sinks[clientID].ch
|
||||||
e.m.Unlock()
|
e.m.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user