From bb28d9bc323b88fa82809547f384f4cff72e991e Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 1 Oct 2023 20:54:53 -0600 Subject: [PATCH] Fixed handling of lockable self-success messages --- lockable.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lockable.go b/lockable.go index 82a6435..54fca8f 100644 --- a/lockable.go +++ b/lockable.go @@ -137,13 +137,14 @@ func (ext *LockableExt) HandleSuccessSignal(ctx *Context, node *Node, source Nod ctx.Log.Logf("lockable", "SUCCESS_SIGNAL: %+v", signal) msgs := Messages{} + if source == node.ID { + return msgs + } info, found := ext.Requirements[source] ctx.Log.Logf("lockable", "State: %+v", ext.State) if found == false { ctx.Log.Logf("lockable", "Got success from non-requirement %s", source) - } else if source == node.ID { - // Do nothing with it } else if info.MsgID != signal.ReqID { ctx.Log.Logf("lockable", "Got success for wrong signal for %s: %s, expecting %s", source, signal.ReqID, info.MsgID) } else {