refactor: standardize constant names and improve goroutine handling across multiple files.

This commit is contained in:
Miroslav Šedivý
2026-04-08 15:16:47 +02:00
parent 79e498090d
commit a4f1cfbe0d
14 changed files with 85 additions and 88 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import (
// client is expected to reconnect within 5 second
// if some unexpected websocket disconnect happens
const WS_DELAYED_DURATION = 5 * time.Second
const wsDelayedDuration = 5 * time.Second
type SessionCtx struct {
id string
@@ -165,7 +165,7 @@ func (session *SessionCtx) DisconnectWebSocketPeer(websocketPeer types.WebSocket
var wsDelayedTimer *time.Timer
if delayed {
wsDelayedTimer = time.AfterFunc(WS_DELAYED_DURATION, func() {
wsDelayedTimer = time.AfterFunc(wsDelayedDuration, func() {
session.DisconnectWebSocketPeer(websocketPeer, false)
})
}