mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-26 18:51:38 +00:00
temporary workaround to concurrency bug in sessions.getSharedKey
This commit is contained in:
parent
fbe44ea973
commit
cd29fde178
@ -298,6 +298,8 @@ func (ss *sessions) getPing(sinfo *sessionInfo) sessionPing {
|
|||||||
// This comes up with dht req/res and session ping/pong traffic.
|
// This comes up with dht req/res and session ping/pong traffic.
|
||||||
func (ss *sessions) getSharedKey(myPriv *crypto.BoxPrivKey,
|
func (ss *sessions) getSharedKey(myPriv *crypto.BoxPrivKey,
|
||||||
theirPub *crypto.BoxPubKey) *crypto.BoxSharedKey {
|
theirPub *crypto.BoxPubKey) *crypto.BoxSharedKey {
|
||||||
|
return crypto.GetSharedKey(myPriv, theirPub)
|
||||||
|
// FIXME concurrency issues with the below, so for now we just burn the CPU every time
|
||||||
if skey, isIn := ss.permShared[*theirPub]; isIn {
|
if skey, isIn := ss.permShared[*theirPub]; isIn {
|
||||||
return skey
|
return skey
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user