From 6edb5c30d5dc3c34e5895913a990bf515848f52d Mon Sep 17 00:00:00 2001 From: James Shubin Date: Tue, 6 Dec 2016 14:22:34 -0500 Subject: [PATCH] resources: Actually verify which send/recv elements changed When updating the code, I forgot to actually verify if there were changes or not. This caused erroneous changed messages when none were actually sent. --- pgraph/actions.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pgraph/actions.go b/pgraph/actions.go index 06b0e69e..a20c1615 100644 --- a/pgraph/actions.go +++ b/pgraph/actions.go @@ -177,7 +177,12 @@ func (g *Graph) Process(v *Vertex) error { if updated, err := obj.SendRecv(obj); err != nil { return errwrap.Wrapf(err, "could not SendRecv in Process") } else if len(updated) > 0 { - obj.StateOK(false) // invalidate cache, mark as dirty + for _, changed := range updated { + if changed { // at least one was updated + obj.StateOK(false) // invalidate cache, mark as dirty + break + } + } } var noop = obj.Meta().Noop // lookup the noop value