mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-19 14:29:27 +00:00
p2p/discv5: fix topic register panic at shutdown (#15946)
This commit is contained in:
parent
302c17c36a
commit
397c6cde1e
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue