mirror of
https://github.com/livekit/livekit.git
synced 2026-11-23 02:29:22 +00:00
Do not call nil callback (#4607)
This commit is contained in:
1 parent
9a7fe3cc68
commit
a011d995da
1 file changed
+3
-1
@@ -966,7 +966,9 @@ func (p *ParticipantImpl) GetTelemetryListener() types.ParticipantTelemetryListe
|
||||
|
||||
func (p *ParticipantImpl) AddOnClose(key string, callback func(types.LocalParticipant)) {
|
||||
if p.isClosed.Load() {
|
||||
go callback(p)
|
||||
if callback != nil {
|
||||
go callback(p)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user