Some tweaks

This commit is contained in:
Neil Alexander 2019-04-20 20:22:58 +01:00
parent d01662c1fb
commit 62621f2960
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 22 additions and 19 deletions

View file

@ -212,7 +212,9 @@ func (s *searches) checkDHTRes(info *searchInfo, res *dhtRes) bool {
}
}
// FIXME (!) replay attacks could mess with coords? Give it a handle (tstamp)?
sinfo.coordsMutex.Lock()
sinfo.coords = res.Coords
sinfo.coordsMutex.Unlock()
sinfo.packet = info.packet
s.core.sessions.ping(sinfo)
info.callback(sinfo, nil)