diff --git a/api/version_vars.go b/api/version_vars.go index fe6acf57e3e33481b9b788cdb7364301392d32e2..fa844ec2db29fa3a5d5899abb0adbfaa043a1a03 100644 --- a/api/version_vars.go +++ b/api/version_vars.go @@ -1,9 +1,9 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots at -// 2021-04-16 13:10:29.436463 -0500 CDT m=+0.022389085 +// 2021-04-29 12:54:02.223688 -0500 CDT m=+0.028208749 package api -const GITVERSION = `6f9309c8 go fmt` +const GITVERSION = `9c8c08ea prevent updating with an empty ndf` const SEMVER = "2.4.0" const DEPENDENCIES = `module gitlab.com/elixxir/client @@ -13,26 +13,26 @@ require ( github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 github.com/golang/protobuf v1.4.3 github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect - github.com/magiconair/properties v1.8.4 // indirect - github.com/mitchellh/mapstructure v1.4.0 // indirect - github.com/pelletier/go-toml v1.8.1 // indirect + github.com/magiconair/properties v1.8.5 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/pelletier/go-toml v1.9.0 // indirect github.com/pkg/errors v0.9.1 github.com/smartystreets/assertions v1.0.1 // indirect - github.com/spf13/afero v1.5.1 // indirect github.com/spf13/cast v1.3.1 // indirect - github.com/spf13/cobra v1.1.1 + github.com/spf13/cobra v1.1.3 github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/viper v1.7.1 gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228 - gitlab.com/elixxir/comms v0.0.4-0.20210413160356-853e51fc18e5 - gitlab.com/elixxir/crypto v0.0.7-0.20210412231025-6f75c577f803 + gitlab.com/elixxir/comms v0.0.4-0.20210427005410-7ae183abda2a + gitlab.com/elixxir/crypto v0.0.7-0.20210427005255-4fe1bcf69c5a gitlab.com/elixxir/ekv v0.1.5 - gitlab.com/elixxir/primitives v0.0.3-0.20210409190923-7bf3cd8d97e7 - gitlab.com/xx_network/comms v0.0.4-0.20210413212014-5e898f41f33a - gitlab.com/xx_network/crypto v0.0.5-0.20210405224157-2b1f387b42c1 + gitlab.com/elixxir/primitives v0.0.3-0.20210427004615-c68ecf15fcf3 + gitlab.com/xx_network/comms v0.0.4-0.20210426213447-82674e09e402 + gitlab.com/xx_network/crypto v0.0.5-0.20210420170153-2a6276844076 gitlab.com/xx_network/primitives v0.0.4-0.20210402222416-37c1c4d3fac4 golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 - golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect + golang.org/x/sys v0.0.0-20210426230700-d19ff857e887 // indirect + golang.org/x/text v0.3.6 // indirect google.golang.org/genproto v0.0.0-20210105202744-fe13368bc0e1 // indirect google.golang.org/grpc v1.34.0 // indirect google.golang.org/protobuf v1.26.0-rc.1 diff --git a/network/gateway/hostPool.go b/network/gateway/hostPool.go index 173ca2e2a691f94c0b78d4065e9d3bd9ece7ddda..f165ce5a9424a37e08e2442bdafc884959a2472b 100644 --- a/network/gateway/hostPool.go +++ b/network/gateway/hostPool.go @@ -5,8 +5,9 @@ // LICENSE file // /////////////////////////////////////////////////////////////////////////////// -// Handles functionality related to providing Gateway connect.Host objects +// Package gateway Handles functionality related to providing Gateway connect.Host objects // for message sending to the rest of the client repo +// Used to minimize # of open connections on mobile clients package gateway @@ -30,7 +31,8 @@ import ( // List of errors that initiate a Host replacement var errorsList = []string{"context deadline exceeded", "connection refused", "host disconnected", - "transport is closing", "all SubConns are in TransientFailure", ndf.NO_NDF} + "transport is closing", "all SubConns are in TransientFailure", "Last try to connect", + ndf.NO_NDF, "Host is in cool down"} // HostManager Interface allowing storage and retrieval of Host objects type HostManager interface { @@ -125,6 +127,11 @@ func newHostPool(poolParams PoolParams, rng *fastRNG.StreamGenerator, ndf *ndf.N // UpdateNdf Mutates internal ndf to the given ndf func (h *HostPool) UpdateNdf(ndf *ndf.NetworkDefinition) { + if len(ndf.Gateways) == 0 { + jww.WARN.Printf("Unable to UpdateNdf: no gateways available") + return + } + h.ndfMux.Lock() h.ndf = ndf