We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e133f9b commit 01d8df0Copy full SHA for 01d8df0
internal/engine/game/initialstate.go
@@ -4,6 +4,7 @@ import (
4
"context"
5
"encoding/json"
6
"fmt"
7
+ "time"
8
9
"github.com/jonasdacruz/lighthouses_aicontest/internal/engine/lighthouse"
10
"github.com/jonasdacruz/lighthouses_aicontest/internal/engine/player"
@@ -57,7 +58,8 @@ func (e *Game) SendInitialState() {
57
58
panic(err)
59
}
60
- ctx, cancel := context.WithTimeout(context.Background(), viper.GetDuration("turn_request_timeout"))
61
+ // Add 5 seconds timeout to the InitialState call
62
+ ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
63
defer cancel()
64
65
// sending initial state to player
0 commit comments