Skip to content

Commit b00f705

Browse files
committed
Merge Fix nil pointer dereference in events.go handling node removal (#1652)
2 parents e28a3ae + 33fce52 commit b00f705

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,4 @@ Ondrej Polakovič <[email protected]>
130130
Sergei Karetnikov <[email protected]>
131131
Stefan Miklosovic <[email protected]>
132132
Adam Burk <[email protected]>
133+
Valerii Ponomarov <[email protected]>

events.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ func (s *Session) handleRemovedNode(ip net.IP, port int) {
240240

241241
// we remove all nodes but only add ones which pass the filter
242242
host, ok := s.ring.getHostByIP(ip.String())
243-
hostID := host.HostID()
244243
if ok {
244+
hostID := host.HostID()
245245
s.ring.removeHost(hostID)
246246

247247
host.setState(NodeDown)

0 commit comments

Comments
 (0)