Commit 397c6cde authored by Felföldi Zsolt's avatar Felföldi Zsolt Committed by Péter Szilágyi

p2p/discv5: fix topic register panic at shutdown (#15946)

parent 302c17c3
...@@ -350,7 +350,7 @@ func (s *ticketStore) nextFilteredTicket() (*ticketRef, time.Duration) { ...@@ -350,7 +350,7 @@ func (s *ticketStore) nextFilteredTicket() (*ticketRef, time.Duration) {
regTime := now + mclock.AbsTime(wait) regTime := now + mclock.AbsTime(wait)
topic := ticket.t.topics[ticket.idx] 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 return ticket, wait
} }
s.removeTicketRef(*ticket) s.removeTicketRef(*ticket)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment