Remove gossip connection limit entirely

This simply turns off gossip connection limits, so we shouldn't ever have to manually configure them.

Follow on to #5077
This commit is contained in:
Justin Santa Barbara 2018-07-21 16:22:51 -04:00
parent 19b81f011d
commit 9b70f75aa9
1 changed files with 5 additions and 3 deletions

View File

@ -41,14 +41,16 @@ type MeshGossiper struct {
func NewMeshGossiper(listen string, channelName string, nodeName string, password []byte, seeds gossip.SeedProvider) (*MeshGossiper, error) {
connLimit := 64
connLimit := 0 // 0 means no limit
gossipDnsConnLimit := os.Getenv("GOSSIP_DNS_CONN_LIMIT")
if gossipDnsConnLimit != "" {
limit, err := strconv.Atoi(gossipDnsConnLimit)
if err != nil {
return nil, fmt.Errorf("cannot parse env GOSSIP_DNS_CONN_LIMIT value: %v, err:%v", gossipDnsConnLimit, err)
// Continue with the default value
glog.Warningf("cannot parse env GOSSIP_DNS_CONN_LIMIT value %q", gossipDnsConnLimit)
} else {
connLimit = limit
}
connLimit = limit
}
glog.Infof("gossip dns connection limit is:%d", connLimit)