From 2131a5c1f0278d40596f212edc667e41092bac8b Mon Sep 17 00:00:00 2001 From: can1357 Date: Wed, 13 Mar 2024 03:19:39 +0100 Subject: [PATCH] Increasing timeouts for nats response. --- autonats/server.go | 4 ++-- revision/self.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autonats/server.go b/autonats/server.go index 86e89c6..1d65df8 100644 --- a/autonats/server.go +++ b/autonats/server.go @@ -379,8 +379,8 @@ func StartServer(opts Options) (srv *Server, err error) { // Try messaging the jetstream API up to 5 times var jserr error - for i := 0; i < 5; i++ { - _, jserr = conn.Request("$JS.API.INFO", nil, 100*time.Millisecond) + for i := 1; i <= 10; i++ { + _, jserr = conn.Request("$JS.API.INFO", nil, time.Duration(i*100)*time.Millisecond) if jserr == nil { break } diff --git a/revision/self.go b/revision/self.go index f999460..4852130 100644 --- a/revision/self.go +++ b/revision/self.go @@ -7,7 +7,7 @@ import ( ) var ( - VersionString = "v0.3" // Only updated for major/minor releases. + VersionString = "v0.4" // Only updated for major/minor releases. ) func getCommit() string {