Skip to content

Commit

Permalink
p2p/discv5: fix topic register panic at shutdown (ethereum#15946)
Browse files Browse the repository at this point in the history
  • Loading branch information
zsfelfoldi authored and karalabe committed Jan 23, 2018
1 parent 302c17c commit 397c6cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/discv5/ticket.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (s *ticketStore) nextFilteredTicket() (*ticketRef, time.Duration) {

regTime := now + mclock.AbsTime(wait)
topic := ticket.t.topics[ticket.idx]
if regTime >= s.tickets[topic].nextReg {
if s.tickets[topic] != nil && regTime >= s.tickets[topic].nextReg {
return ticket, wait
}
s.removeTicketRef(*ticket)
Expand Down

0 comments on commit 397c6cd

Please sign in to comment.