Skip to content

Commit

Permalink
Remove peer MaxConnectionTime
Browse files Browse the repository at this point in the history
There is no need to always disconnect the Websocket connection after an
hour. This just causes issues once in a while with db queries being
executed at the same time and then being cancelled.
  • Loading branch information
erikdubbelboer committed Feb 5, 2025
1 parent 985ef5c commit 94c6cb6
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions internal/signaling/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import (
"go.uber.org/zap"
)

const MaxConnectionTime = 1 * time.Hour

const LobbyCleanInterval = 30 * time.Minute
const LobbyCleanThreshold = 24 * time.Hour

Expand Down Expand Up @@ -51,9 +49,6 @@ func Handler(ctx context.Context, store stores.Store, cloudflare *cloudflare.Cre
logger := logging.GetLogger(ctx)
logger.Debug("upgrading connection")

ctx, cancel := context.WithTimeout(ctx, MaxConnectionTime)
defer cancel()

acceptOptions := &websocket.AcceptOptions{
InsecureSkipVerify: true, // Allow any origin/game to connect.
CompressionMode: websocket.CompressionDisabled,
Expand Down

0 comments on commit 94c6cb6

Please sign in to comment.