mirror of
https://github.com/livekit/livekit.git
synced 2026-07-02 04:52:09 +00:00
Do not call nil callback (#4607)
This commit is contained in:
@@ -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