diff options
author | Felföldi Zsolt <zsfelfoldi@gmail.com> | 2018-01-23 18:53:09 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-01-23 18:53:09 +0800 |
commit | 397c6cde1e2fd3636024cad5d23d5e06796772dc (patch) | |
tree | 4318c52b7d7d31209827d379b521823fe2c9a993 | |
parent | 302c17c36a32ca445e4fb898a09cbe7a0024ec53 (diff) | |
download | dexon-397c6cde1e2fd3636024cad5d23d5e06796772dc.tar dexon-397c6cde1e2fd3636024cad5d23d5e06796772dc.tar.gz dexon-397c6cde1e2fd3636024cad5d23d5e06796772dc.tar.bz2 dexon-397c6cde1e2fd3636024cad5d23d5e06796772dc.tar.lz dexon-397c6cde1e2fd3636024cad5d23d5e06796772dc.tar.xz dexon-397c6cde1e2fd3636024cad5d23d5e06796772dc.tar.zst dexon-397c6cde1e2fd3636024cad5d23d5e06796772dc.zip |
p2p/discv5: fix topic register panic at shutdown (#15946)
-rw-r--r-- | p2p/discv5/ticket.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/p2p/discv5/ticket.go b/p2p/discv5/ticket.go index 023c5000d..1ecef37e4 100644 --- a/p2p/discv5/ticket.go +++ b/p2p/discv5/ticket.go @@ -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) |