aboutsummaryrefslogtreecommitdiff
path: root/cmd/btcheck/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/btcheck/main.go')
-rw-r--r--cmd/btcheck/main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/btcheck/main.go b/cmd/btcheck/main.go
index d9162d8..6d79e8b 100644
--- a/cmd/btcheck/main.go
+++ b/cmd/btcheck/main.go
@@ -37,9 +37,10 @@ func main() {
}
pool := make(map[string]tracker.Peer)
for p := range req.Poll(tor.Announce) {
- if _, ok := pool[p.IP]; !ok {
+ addr := p.Addr()
+ if _, ok := pool[addr]; !ok {
log.Println("new peer", p)
- pool[p.IP] = p
+ pool[addr] = p
}
}
}