Browse Source

Fix some FIXME tasks

master
Lyndsay Roger 9 years ago
parent
commit
8563f1cdac
  1. 2
      crawler.go
  2. 2
      main.go
  3. 3
      seeder.go

2
crawler.go

@ -136,8 +136,6 @@ func crawlNode(s *dnsseeder, nd *node) {
// crawlEnd is a deffered func to update theList after a crawl is all done // crawlEnd is a deffered func to update theList after a crawl is all done
func crawlEnd(nd *node) { func crawlEnd(nd *node) {
nd.crawlActive = false nd.crawlActive = false
// FIXME - scan for long term crawl active node. Dial timeout is 10 seconds
// so should be done in under 5 minutes
} }
// crawlIP retrievs a slice of ip addresses from a client // crawlIP retrievs a slice of ip addresses from a client

2
main.go

@ -87,7 +87,6 @@ func main() {
os.Exit(1) os.Exit(1)
} }
if nnw != nil { if nnw != nil {
// FIXME - lock this
config.seeders[nnw.name] = nnw config.seeders[nnw.name] = nnw
config.order = append(config.order, nnw.name) config.order = append(config.order, nnw.name)
} }
@ -145,7 +144,6 @@ func main() {
log.Printf("debug - Audit nodes timer triggered\n") log.Printf("debug - Audit nodes timer triggered\n")
} }
for _, s := range config.seeders { for _, s := range config.seeders {
// FIXME goroutines for these
s.auditNodes() s.auditNodes()
} }
case <-dnsChan: case <-dnsChan:

3
seeder.go

@ -393,6 +393,9 @@ func (s *dnsseeder) loadDNS() {
// isFull returns true if the number of remote clients is more than we want to store // isFull returns true if the number of remote clients is more than we want to store
func (s *dnsseeder) isFull() bool { func (s *dnsseeder) isFull() bool {
s.mtx.RLock()
defer s.mtx.RUnlock()
if len(s.theList) > s.maxSize { if len(s.theList) > s.maxSize {
return true return true
} }

Loading…
Cancel
Save