Metrics operations shouldn't be inside goroutine (#13950)
Metrics operations are done in memory so there is no need to spawn a new goroutine
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2a5d30f8f3
Коммит
89f4e9d7ef
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user