2
0

Add comment.

This commit is contained in:
georgysavva
2020-05-02 16:39:51 +03:00
parent 391e1ef2ce
commit 2d5a17beab
+1
View File
@@ -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)