Skip to content

Commit

Permalink
Merge Fix nil pointer dereference in events.go handling node removal (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-sucha committed Sep 2, 2022
2 parents e28a3ae + 33fce52 commit b00f705
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ Ondrej Polakovič <[email protected]>
Sergei Karetnikov <[email protected]>
Stefan Miklosovic <[email protected]>
Adam Burk <[email protected]>
Valerii Ponomarov <[email protected]>
2 changes: 1 addition & 1 deletion events.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ func (s *Session) handleRemovedNode(ip net.IP, port int) {

// we remove all nodes but only add ones which pass the filter
host, ok := s.ring.getHostByIP(ip.String())
hostID := host.HostID()
if ok {
hostID := host.HostID()
s.ring.removeHost(hostID)

host.setState(NodeDown)
Expand Down

0 comments on commit b00f705

Please sign in to comment.