Skip to content

Commit 1544593

Browse files
committed
ncpm: fix
1 parent c6bbd08 commit 1544593

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

model/network_client_proxy_model.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,10 @@ func CreateProxyClient(
487487

488488
server.Tx(ctx, func(tx server.PgTx) {
489489
hosts := maps.Keys(proxyConfig.Hosts)
490+
if len(hosts) == 0 {
491+
returnErr = fmt.Errorf("No proxy hosts available")
492+
return
493+
}
490494
proxyHost := hosts[mathrand.Intn(len(hosts))]
491495

492496
blockServicePorts := proxyConfig.Hosts[proxyHost]

0 commit comments

Comments
 (0)