mirror of
https://github.com/pion/webrtc.git
synced 2025-12-24 11:51:03 +08:00
Cleanup statsGetter after peer is closed
This commit is contained in:
@@ -69,6 +69,11 @@ func lookupStats(id string) (stats.Getter, bool) {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// cleanupStats removes the stats getter for a given peerconnection.statsId.
|
||||
func cleanupStats(id string) {
|
||||
statsGetter.Delete(id)
|
||||
}
|
||||
|
||||
// key: string (peerconnection.statsId), value: stats.Getter
|
||||
var statsGetter sync.Map // nolint:gochecknoglobals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user