From 06ce0b8da9a7225b6cfb9bf22ca1587986e4e7a6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 17 Nov 2021 12:12:40 +0100 Subject: [PATCH] Lower sanityCheckServer timeout to 15s Should still be more than enough to connect even if the network is somewhat flaky. --- downstream.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downstream.go b/downstream.go index f6eb519..ceda5fd 100644 --- a/downstream.go +++ b/downstream.go @@ -1031,7 +1031,7 @@ func (dc *downstreamConn) updateRealname() { } func sanityCheckServer(ctx context.Context, addr string) error { - ctx, cancel := context.WithTimeout(ctx, 30*time.Second) + ctx, cancel := context.WithTimeout(ctx, 15*time.Second) defer cancel() conn, err := new(tls.Dialer).DialContext(ctx, "tcp", addr)