mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +00:00
fix infinite loop from interaction between dht.isImportant and dht.insert
This commit is contained in:
parent
0ec6207e05
commit
d8d1e63c36
@ -361,6 +361,9 @@ func (t *dht) getImportant() []*dhtInfo {
|
||||
|
||||
// Returns true if this is a node we need to keep track of for the DHT to work.
|
||||
func (t *dht) isImportant(ninfo *dhtInfo) bool {
|
||||
if ninfo.key == t.core.boxPub {
|
||||
return false
|
||||
}
|
||||
important := t.getImportant()
|
||||
// Check if ninfo is of equal or greater importance to what we already know
|
||||
loc := t.core.switchTable.getLocator()
|
||||
|
Loading…
Reference in New Issue
Block a user