5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-12-26 17:05:42 +00:00

Merge pull request #527 from Arceliar/bugfix

Bugfix
This commit is contained in:
Arceliar 2019-09-01 14:15:00 -05:00 committed by GitHub
commit f72546c85d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,6 +204,11 @@ func (sinfo *searchInfo) checkDHTRes(res *dhtRes) bool {
if !isIn {
panic("This should never happen")
}
} else {
sinfo.callback(nil, errors.New("session already exists"))
// Cleanup
delete(sinfo.searches.searches, res.Dest)
return true
}
// FIXME (!) replay attacks could mess with coords? Give it a handle (tstamp)?
sess.coords = res.Coords