From 5cb0be51e428b900c33bbe7dd14767887159be32 Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Tue, 7 Oct 2008 12:42:27 -0400 Subject: Run service drop task /after/ state change For synchronization, delay dropping the class until after the state has changed. --- state.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/state.rb b/state.rb index 1c6d09e..db21952 100644 --- a/state.rb +++ b/state.rb @@ -124,9 +124,10 @@ class State # Set this state to untrue def drop return unless @active + trace "Dropping #{self}" break_holds if @holds.size > 0 - self.class.falling_edge.call(params) becomes_defunct + self.class.falling_edge.call(params) end # Parameters to this state -- cgit