Skip to content

Commit

Permalink
fix: minor typos and code quality issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aloknerurkar committed Sep 7, 2021
1 parent fbc4fab commit 723e876
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/topology/kademlia/kademlia.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,8 @@ func (k *Kad) connect(ctx context.Context, peer swarm.Address, ma ma.Multiaddr)

return err
case !i.Overlay.Equal(peer):
_ = k.p2p.Disconnect(peer, "overlay mismatch")
_ = k.p2p.Disconnect(i.Overlay, "overlay mismatch")
_ = k.p2p.Disconnect(peer, errOverlayMismatch.Error())
_ = k.p2p.Disconnect(i.Overlay, errOverlayMismatch.Error())
return errOverlayMismatch
}

Expand Down Expand Up @@ -805,7 +805,7 @@ func (k *Kad) Connected(ctx context.Context, peer p2p.Peer, forceConnection bool
if err != nil {
return err
}
_ = k.p2p.Disconnect(randPeer, "kicking out random peer to accomodate node")
_ = k.p2p.Disconnect(randPeer, "kicking out random peer to accommodate node")
return k.onConnected(ctx, address)
}
if !forceConnection {
Expand Down

0 comments on commit 723e876

Please sign in to comment.