From c3e8013c4f087bc98c5ea7f520dbb8e0955b28d4 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 15 Feb 2026 18:29:14 +0000 Subject: [PATCH] make the example implementation a little more useful with a timeouts map. --- cmd/q3rcon/main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/q3rcon/main.go b/cmd/q3rcon/main.go index 93742ca..938a2c7 100644 --- a/cmd/q3rcon/main.go +++ b/cmd/q3rcon/main.go @@ -7,6 +7,7 @@ import ( "io" "os" "strings" + "time" log "github.com/sirupsen/logrus" @@ -105,7 +106,11 @@ func run() (func(), error) { } func connectRcon(host string, port int, password string) (*q3rcon.Rcon, error) { - rcon, err := q3rcon.New(host, port, password) + rcon, err := q3rcon.New(host, port, password, q3rcon.WithTimeouts(map[string]time.Duration{ + "map": time.Second, + "map_rotate": time.Second, + "map_restart": time.Second, + })) if err != nil { return nil, err }