From 2d5a17beab6e8f40c60b56efe0a92e9528f2a424 Mon Sep 17 00:00:00 2001 From: georgysavva Date: Sat, 2 May 2020 16:39:51 +0300 Subject: [PATCH] Add comment. --- pgconn.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pgconn.go b/pgconn.go index 932984c8..69f42621 100644 --- a/pgconn.go +++ b/pgconn.go @@ -116,6 +116,7 @@ func ConnectConfig(ctx context.Context, config *Config) (pgConn *PgConn, err err panic("config must be created by ParseConfig") } + // ConnectTimeout restricts the whole connection process. if config.ConnectTimeout != 0 { var cancel context.CancelFunc ctx, cancel = context.WithTimeout(ctx, config.ConnectTimeout)