From 40204caab6c9a29a2d56ba9c18f8c75ce4850bed Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 18 Sep 2019 14:03:31 +0100 Subject: [PATCH] Try to fix race condition in sessions.reset --- src/yggdrasil/session.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/yggdrasil/session.go b/src/yggdrasil/session.go index 8a6d16fc..778fa2a9 100644 --- a/src/yggdrasil/session.go +++ b/src/yggdrasil/session.go @@ -414,11 +414,10 @@ func (sinfo *sessionInfo) _updateNonce(theirNonce *crypto.BoxNonce) { // Resets all sessions to an uninitialized state. // Called after coord changes, so attemtps to use a session will trigger a new ping and notify the remote end of the coord change. +// Only call this from the router actor. func (ss *sessions) reset() { for _, sinfo := range ss.sinfos { - sinfo.Act(ss.router, func() { - sinfo.reset = true - }) + sinfo.reset = true } }