Browse Source

Fix: use of uninitialized map

Rod Hynes 1 year ago
parent
commit
6ce89cd2fe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      psiphon/common/inproxy/webrtc.go

+ 1 - 1
psiphon/common/inproxy/webrtc.go

@@ -816,7 +816,7 @@ func (conn *webRTCConn) getICECandidatePairsSummary() string {
 	conn.mutex.Lock()
 	defer conn.mutex.Unlock()
 
-	var stateCounts map[webrtc.StatsICECandidatePairState]int
+	stateCounts := map[webrtc.StatsICECandidatePairState]int{}
 
 	statsReport := conn.peerConnection.GetStats()
 	for key, stats := range statsReport {