Skip to content

Commit 6588869

Browse files
authored
fix: ensure peers is not nil (#290)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 809cce8 commit 6588869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

peergov/peergov.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (p *PeerGovernor) LoadTopologyConfig(
7171
p.mu.Lock()
7272
defer p.mu.Unlock()
7373
// Remove peers originally sourced from the topology
74-
var tmpPeers []*Peer
74+
tmpPeers := []*Peer{}
7575
for _, tmpPeer := range p.peers {
7676
if tmpPeer.Source == PeerSourceTopologyBootstrapPeer ||
7777
tmpPeer.Source == PeerSourceTopologyLocalRoot ||

0 commit comments

Comments
 (0)