cl.torrents = make(map[metainfo.Hash]*Torrent)
cl.dialRateLimiter = rate.NewLimiter(10, 10)
cl.activeAnnounceLimiter.SlotsPerKey = 2
-
+
cl.event.L = cl.locker()
cl.ipBlockList = cfg.IPBlocklist
}
cl = nil
}
}()
-
+
storageImpl := cfg.DefaultStorage
if storageImpl == nil {
// We'd use mmap by default but HFS+ doesn't support sparse files.
metadataChanged: sync.Cond{
L: cl.locker(),
},
- webSeeds: make(map[string]*Peer),
+ webSeeds: make(map[string]*Peer),
gotMetainfoC: make(chan struct{}),
}
t.networkingEnabled.Set()
return nil
}
-
func (cl *Client) publicIp(peer net.IP) net.IP {
// TODO: Use BEP 10 to determine how peers are seeing us.
if peer.To4() != nil {