Add comment.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user