Fix tracking websocket connections (#26943)

Этот коммит содержится в:
Claudio Costa
2024-05-08 10:12:50 -06:00
коммит произвёл GitHub
родитель 8fa6757949
Коммит be2ffbcd0c
2 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@@ -423,9 +423,6 @@ func (h *Hub) Start() {
connIndex.Add(webConn)
atomic.StoreInt64(&h.connectionCount, int64(connIndex.AllActive()))
if metrics := h.platform.metricsIFace; metrics != nil {
metrics.IncrementHTTPWebSockets(webConn.originClient)
}
if webConn.IsAuthenticated() && webConn.reuseCount == 0 {
// The hello message should only be sent when the reuseCount is 0.
@@ -440,9 +437,6 @@ func (h *Hub) Start() {
webConn.active.Store(false)
atomic.StoreInt64(&h.connectionCount, int64(connIndex.AllActive()))
if metrics := h.platform.metricsIFace; metrics != nil {
metrics.DecrementHTTPWebSockets(webConn.originClient)
}
if webConn.UserId == "" {
continue