diff --git a/pgconn.go b/pgconn.go index 894baa2..8d4f385 100644 --- a/pgconn.go +++ b/pgconn.go @@ -188,6 +188,10 @@ func ConnectConfig(octx context.Context, config *Config) (pgConn *PgConn, err er if _, ok := cerr.err.(*NotPreferredError); ok { fallbackConfig = fc } + if _, ok := cerr.err.(*errTimeout); ok { + // once we reach timeout it's useless to check other fallbacks + break + } } }