mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
Keep the default LB strategy if an invalid p* one is used
This commit is contained in:
parent
62a20fd97a
commit
d876c7b487
2 changed files with 4 additions and 2 deletions
|
@ -4,6 +4,7 @@ require_dnssec = true
|
|||
dnscrypt_ephemeral_keys = true
|
||||
tls_disable_session_tickets = false
|
||||
ignore_system_dns = false
|
||||
lb_strategy = 'p12'
|
||||
block_ipv6 = true
|
||||
block_unqualified = true
|
||||
block_undelegated = true
|
||||
|
|
|
@ -375,9 +375,10 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
|
|||
if strings.HasPrefix(lbStrategyStr, "p") {
|
||||
n, err := strconv.ParseInt(strings.TrimPrefix(lbStrategyStr, "p"), 10, 32)
|
||||
if err != nil || n <= 0 {
|
||||
dlog.Fatalf("Invalid load balancing strategy: [%s]", config.LBStrategy)
|
||||
dlog.Warnf("Invalid load balancing strategy: [%s]", config.LBStrategy)
|
||||
} else {
|
||||
lbStrategy = LBStrategyPN{n: int(n)}
|
||||
}
|
||||
lbStrategy = LBStrategyPN{n: int(n)}
|
||||
} else {
|
||||
dlog.Warnf("Unknown load balancing strategy: [%s]", config.LBStrategy)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue