Add a check for a strange panic in production

This commit is contained in:
Matt Joiner 2018-02-15 16:03:44 +11:00
parent 35b224ba36
commit 0aad14afd1
1 changed files with 3 additions and 0 deletions

View File

@ -1099,6 +1099,9 @@ func (cl *Client) prepareTrackerAnnounceUnlocked(announceURL string) (blocked bo
if err != nil {
return
}
if addr.IP == nil {
panic(hmp.Host)
}
cl.mu.RLock()
_, blocked = cl.ipBlockRange(addr.IP)
cl.mu.RUnlock()