Skip to content
Snippets Groups Projects
Commit 3bd70045 authored by Jonah Husson's avatar Jonah Husson
Browse files

Merge branch 'release' into dnf/notificationsbot

parents 5e4f1bec 2f7b04d4
No related branches found
No related tags found
No related merge requests found
// Code generated by go generate; DO NOT EDIT. // Code generated by go generate; DO NOT EDIT.
// This file was generated by robots at // 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 package api
const GITVERSION = `6f9309c8 go fmt` const GITVERSION = `9c8c08ea prevent updating with an empty ndf`
const SEMVER = "2.4.0" const SEMVER = "2.4.0"
const DEPENDENCIES = `module gitlab.com/elixxir/client const DEPENDENCIES = `module gitlab.com/elixxir/client
...@@ -13,26 +13,26 @@ require ( ...@@ -13,26 +13,26 @@ require (
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang/protobuf v1.4.3 github.com/golang/protobuf v1.4.3
github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect
github.com/magiconair/properties v1.8.4 // indirect github.com/magiconair/properties v1.8.5 // indirect
github.com/mitchellh/mapstructure v1.4.0 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect github.com/pelletier/go-toml v1.9.0 // indirect
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/smartystreets/assertions v1.0.1 // indirect 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/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/jwalterweatherman v1.1.0
github.com/spf13/viper v1.7.1 github.com/spf13/viper v1.7.1
gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228 gitlab.com/elixxir/bloomfilter v0.0.0-20200930191214-10e9ac31b228
gitlab.com/elixxir/comms v0.0.4-0.20210413160356-853e51fc18e5 gitlab.com/elixxir/comms v0.0.4-0.20210427005410-7ae183abda2a
gitlab.com/elixxir/crypto v0.0.7-0.20210412231025-6f75c577f803 gitlab.com/elixxir/crypto v0.0.7-0.20210427005255-4fe1bcf69c5a
gitlab.com/elixxir/ekv v0.1.5 gitlab.com/elixxir/ekv v0.1.5
gitlab.com/elixxir/primitives v0.0.3-0.20210409190923-7bf3cd8d97e7 gitlab.com/elixxir/primitives v0.0.3-0.20210427004615-c68ecf15fcf3
gitlab.com/xx_network/comms v0.0.4-0.20210413212014-5e898f41f33a gitlab.com/xx_network/comms v0.0.4-0.20210426213447-82674e09e402
gitlab.com/xx_network/crypto v0.0.5-0.20210405224157-2b1f387b42c1 gitlab.com/xx_network/crypto v0.0.5-0.20210420170153-2a6276844076
gitlab.com/xx_network/primitives v0.0.4-0.20210402222416-37c1c4d3fac4 gitlab.com/xx_network/primitives v0.0.4-0.20210402222416-37c1c4d3fac4
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 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/genproto v0.0.0-20210105202744-fe13368bc0e1 // indirect
google.golang.org/grpc v1.34.0 // indirect google.golang.org/grpc v1.34.0 // indirect
google.golang.org/protobuf v1.26.0-rc.1 google.golang.org/protobuf v1.26.0-rc.1
......
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
// LICENSE file // // 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 // for message sending to the rest of the client repo
// Used to minimize # of open connections on mobile clients
package gateway package gateway
...@@ -30,7 +31,8 @@ import ( ...@@ -30,7 +31,8 @@ import (
// List of errors that initiate a Host replacement // List of errors that initiate a Host replacement
var errorsList = []string{"context deadline exceeded", "connection refused", "host disconnected", 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 // HostManager Interface allowing storage and retrieval of Host objects
type HostManager interface { type HostManager interface {
...@@ -125,6 +127,11 @@ func newHostPool(poolParams PoolParams, rng *fastRNG.StreamGenerator, ndf *ndf.N ...@@ -125,6 +127,11 @@ func newHostPool(poolParams PoolParams, rng *fastRNG.StreamGenerator, ndf *ndf.N
// UpdateNdf Mutates internal ndf to the given ndf // UpdateNdf Mutates internal ndf to the given ndf
func (h *HostPool) UpdateNdf(ndf *ndf.NetworkDefinition) { 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.ndfMux.Lock()
h.ndf = ndf h.ndf = ndf
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment