Explorar el Código

Fix: use of uninitialized map

Rod Hynes hace 1 año
padre
commit
6ce89cd2fe
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 {