Metrics operations shouldn't be inside goroutine (#13950)

Metrics operations are done in memory so there is no need
to spawn a new goroutine
This commit is contained in:
Mario de Frutos Dieguez
2020-03-03 11:53:32 +01:00
committed by GitHub
parent 2a5d30f8f3
commit 89f4e9d7ef

View File

@@ -232,9 +232,7 @@ func (wc *WebConn) writePump() {
}
if wc.App.Metrics() != nil {
wc.App.Srv().Go(func() {
wc.App.Metrics().IncrementWebSocketBroadcast(msg.EventType())
})
wc.App.Metrics().IncrementWebSocketBroadcast(msg.EventType())
}
}