Do not call nil callback (#4607)

This commit is contained in:
Raja Subramanian
2026-06-18 23:24:33 +05:30
committed by GitHub
parent 9a7fe3cc68
commit a011d995da
+3 -1
View File
@@ -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
}