Skip to content

Commit

Permalink
Remove gossip connection limit entirely
Browse files Browse the repository at this point in the history
This simply turns off gossip connection limits, so we shouldn't ever have to manually configure them.

Follow on to #5077
  • Loading branch information
justinsb committed Jul 22, 2018
1 parent 19b81f0 commit 9b70f75
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions protokube/pkg/gossip/mesh/gossip.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b70f75

Please sign in to comment.