This commit is contained in:
Kegan Dougal 2023-07-24 16:22:22 +01:00
parent f0ed4969a6
commit a90a9584c9

View File

@ -81,7 +81,7 @@ func (m *ConnMap) UpdateMetrics() {
m.updateMetrics(len(m.connIDToConn))
}
// updateMetrics is like UpdateMetrics but doesn't touch connIDToConn and hence need a lock. We use this internally
// updateMetrics is like UpdateMetrics but doesn't touch connIDToConn and hence doesn't need to lock. We use this internally
// when we need to update the metric and already have the lock held, as calling UpdateMetrics would deadlock.
func (m *ConnMap) updateMetrics(numConns int) {
if m.numConns == nil {