torrent.go | 6 +++++- diff --git a/torrent.go b/torrent.go index 4c5fd153b7aa441379b09de7488b6a01168cf328..d6846dbef762ec5670f630fced1cedaa0f0d28d3 100644 --- a/torrent.go +++ b/torrent.go @@ -207,7 +207,11 @@ if _, ok := t.halfOpen[addr]; ok { return true } for c := range t.conns { - if c.remoteAddr().String() == addr { + ra := c.remoteAddr() + if ra == nil { + continue + } + if ra.String() == addr { return true } }