4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-07-03 09:37:47 +00:00

Change some mutexes to atomics, change conns map to pointers, sort of works but seems to deadlock very easily

This commit is contained in:
Neil Alexander
2019-04-21 11:50:41 +01:00
parent 62621f2960
commit 79bcfbf175
6 changed files with 81 additions and 115 deletions

View File

@ -212,9 +212,7 @@ 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)