From 0aad14afd1fdab600cb22338a3aa3f1012cda923 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 15 Feb 2018 16:03:44 +1100 Subject: [PATCH] Add a check for a strange panic in production --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index 6e8a7c20..55f89902 100644 --- a/client.go +++ b/client.go @@ -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()