magneticod: potential improvements to indexing service
This commit is contained in:
parent
58ef12c79d
commit
18edea1c80
@ -233,6 +233,13 @@ func (is *IndexingService) onSampleInfohashesResponse(msg *Message, addr *net.UD
|
|||||||
is.counter++
|
is.counter++
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: good idea, but also need to track how long they have been here
|
||||||
|
//if msg.R.Num > len(msg.R.Samples) / 20 && time.Duration(msg.R.Interval) <= is.interval {
|
||||||
|
// if addr.Port != 0 { // ignore nodes who "use" port 0...
|
||||||
|
// is.routingTable[string(msg.R.ID)] = addr
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
// iterate
|
// iterate
|
||||||
is.routingTableMutex.Lock()
|
is.routingTableMutex.Lock()
|
||||||
defer is.routingTableMutex.Unlock()
|
defer is.routingTableMutex.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user