Fixed handling of lockable self-success messages

gql_cataclysm
noah metz 2023-10-01 20:54:53 -06:00
parent 96408259d1
commit bb28d9bc32
1 changed files with 3 additions and 2 deletions

@ -137,13 +137,14 @@ func (ext *LockableExt) HandleSuccessSignal(ctx *Context, node *Node, source Nod
ctx.Log.Logf("lockable", "SUCCESS_SIGNAL: %+v", signal) ctx.Log.Logf("lockable", "SUCCESS_SIGNAL: %+v", signal)
msgs := Messages{} msgs := Messages{}
if source == node.ID {
return msgs
}
info, found := ext.Requirements[source] info, found := ext.Requirements[source]
ctx.Log.Logf("lockable", "State: %+v", ext.State) ctx.Log.Logf("lockable", "State: %+v", ext.State)
if found == false { if found == false {
ctx.Log.Logf("lockable", "Got success from non-requirement %s", source) 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 { } 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) ctx.Log.Logf("lockable", "Got success for wrong signal for %s: %s, expecting %s", source, signal.ReqID, info.MsgID)
} else { } else {