summaryrefslogtreecommitdiff
path: root/pkg/vpn/bonafide/gateways.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vpn/bonafide/gateways.go')
-rw-r--r--pkg/vpn/bonafide/gateways.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/vpn/bonafide/gateways.go b/pkg/vpn/bonafide/gateways.go
index 633493e..c442e72 100644
--- a/pkg/vpn/bonafide/gateways.go
+++ b/pkg/vpn/bonafide/gateways.go
@@ -306,7 +306,14 @@ func (p *gatewayPool) getBestLocation(transport string, tz int) string {
}
func (p *gatewayPool) getAll(transport string, tz int) ([]Gateway, error) {
- if len(p.recommended) != 0 {
+ /*
+ if (&gatewayPool{} == p) {
+ log.Println("getAll tried to access uninitialized struct")
+ return []Gateway{}, nil
+ }
+ */
+
+ if p.recommended == nil || len(p.recommended) == 0 {
return p.getGatewaysFromMenshen(transport, 999)
}
return p.getGatewaysByTimezone(transport, tz, 999)