stop the timers (if any) while terminating

This commit is contained in:
momania 2011-01-03 11:12:40 +01:00
parent 61502794de
commit d9b3e42af6

View file

@ -378,6 +378,7 @@ trait FSM[S, D] {
}
private def terminate(reason: Reason) = {
timers.foreach{ case (timer, t) => log.slf4j.info("Canceling timer {}", timer); t.cancel}
terminateEvent.apply(StopEvent(reason, currentState.stateName, currentState.stateData))
self.stop
}