some nodeinfo actor fixes and adjust search timeout

This commit is contained in:
Arceliar 2020-01-06 18:37:43 -06:00
parent 8c12fc4fdb
commit c3b1a6af65
4 changed files with 10 additions and 11 deletions

View file

@ -398,6 +398,7 @@ func (c *Core) GetNodeInfo(key crypto.BoxPubKey, coords []uint64, nocache bool)
}
})
c.router.nodeinfo.sendNodeInfo(key, wire_coordsUint64stoBytes(coords), false)
phony.Block(&c.router.nodeinfo, func() {}) // Wait for sendNodeInfo before starting timer
timer := time.AfterFunc(6*time.Second, func() { close(response) })
defer timer.Stop()
for res := range response {