try to fix a few edge cases with searches that could lead them to ending without the callback being run or without cleaning up the old search info

This commit is contained in:
Arceliar 2019-08-11 13:00:19 -05:00
parent ae05683c73
commit 7a28eb787e
2 changed files with 4 additions and 14 deletions

View file

@ -130,9 +130,9 @@ func (c *Conn) doSearch() {
searchCompleted := func(sinfo *sessionInfo, e error) {}
sinfo = c.core.searches.newIterSearch(c.nodeID, c.nodeMask, searchCompleted)
c.core.log.Debugf("%s DHT search started: %p", c.String(), sinfo)
// Start the search
sinfo.continueSearch()
}
// Continue the search
sinfo.continueSearch()
}
go func() { c.core.router.admin <- routerWork }()
}