summaryrefslogtreecommitdiff
path: root/pkg/vpn
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vpn')
-rw-r--r--pkg/vpn/bonafide/gateways.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/vpn/bonafide/gateways.go b/pkg/vpn/bonafide/gateways.go
index 50359e9..d8f12ec 100644
--- a/pkg/vpn/bonafide/gateways.go
+++ b/pkg/vpn/bonafide/gateways.go
@@ -92,6 +92,9 @@ func (p *gatewayPool) isValidLocation(location string) bool {
func (p *gatewayPool) listLocationFullness(transport string) map[string]float64 {
locations := p.getLocations()
cm := make(map[string]float64)
+ if len(locations) == 0 {
+ return cm
+ }
if len(p.recommended) != 0 {
for _, gw := range p.recommended {
if _, ok := cm[gw.gateway.Location]; ok {