Fix: Use fallback config TLS config
This commit is contained in:
@@ -145,8 +145,8 @@ func connect(ctx context.Context, config *Config, fallbackConfig *FallbackConfig
|
|||||||
|
|
||||||
pgConn.parameterStatuses = make(map[string]string)
|
pgConn.parameterStatuses = make(map[string]string)
|
||||||
|
|
||||||
if config.TLSConfig != nil {
|
if fallbackConfig.TLSConfig != nil {
|
||||||
if err := pgConn.startTLS(config.TLSConfig); err != nil {
|
if err := pgConn.startTLS(fallbackConfig.TLSConfig); err != nil {
|
||||||
pgConn.conn.Close()
|
pgConn.conn.Close()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user