Skip to content

Commit

Permalink
squash: feedback from luke
Browse files Browse the repository at this point in the history
  • Loading branch information
karampok committed Nov 14, 2019
1 parent f5037fa commit 64b8436
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions go/beacon_srv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,14 @@ func (t *periodicTasks) Start() error {
t.running = true
topo := t.topoProvider.Get()
topoAddress := topo.PublicAddress(addr.SvcBS, cfg.General.ID)
if topoAddress == nil {
return serrors.New("Unable to find topo address")
}
bs := &net.UDPAddr{
IP: topoAddress.L3.IP(),
Port: int(topoAddress.L4),
}
if topoAddress == nil {
return serrors.New("Unable to find topo address")
}

var err error
if t.registrars, err = t.startSegRegRunners(); err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion go/lib/discovery/discoveryinfo/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func New(key string, addr *net.UDPAddr) *Info {
func (h *Info) Update(a *net.UDPAddr) {
h.mu.Lock()
defer h.mu.Unlock()
if !h.addr.IP.Equal(a.IP) {
if !h.addr.IP.Equal(a.IP) || h.addr.Port != a.Port {
h.addr = a
h.failCount = 0
h.lastFail = time.Now()
Expand Down
1 change: 0 additions & 1 deletion go/lib/discovery/discoverypool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func (p *Pool) Update(svcInfo topology.IDAddrMap) error {
} else {
info.Update(y)
}

}
// Get list of outdated DS servers.
var del []string
Expand Down

0 comments on commit 64b8436

Please sign in to comment.