Fix panic in Torrent.addrActive if there are closed connections
Fixes #214
This commit is contained in:
parent
47622fad36
commit
27253eb0d0
|
@ -207,7 +207,11 @@ func (t *Torrent) addrActive(addr string) bool {
|
|||
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue