Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-07 Thread Kevin Meredith
If I understand correctly, the expectation is that *no* StateTimeout should be fired - due to the: stay() forMax(Duration.Inf) `forMax` is defined as such: def forMax(timeout: Duration): State[S, D] = timeout match { case f: FiniteDuration ⇒ copy(timeout = Some(f)) case _

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-07 Thread Kevin Meredith
I added a few print statements to https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/FSM.scala#L639-660. Then, I re-ran *folex*'s example to reproduce the bug. scala fsm ! Message currentState.stateName: Initial nextState.notifies: true currentState.timeout: None

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-07 Thread Roland Kuhn
Hi Kevin! You are right in that overriding a timeout with an infinite one is not possible (I’d call it a design restriction of the current API), but just passing 100.days should be a reasonable workaround (Int.MaxValue.nanos will not work since the system’s scheduler is limited to 2^31 *

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-06 Thread folex
https://github.com/akka/akka/issues/17140 On Friday, April 3, 2015 at 6:11:02 PM UTC+3, Akka Team wrote: Hi folex, thanks for reporting. Around that time this commit was merged into FSM https://github.com/akka/akka/commit/2c88bb116903b42decb9d8063dc410325a9b9d29 which indeed changes

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-06 Thread Konrad Malawski
Thanks for reporting! --  Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 6 April 2015 at 12:53:30, folex (0xd...@gmail.com) wrote: https://github.com/akka/akka/issues/17140 On Friday, April 3, 2015 at 6:11:02 PM UTC+3, Akka Team wrote: Hi folex, thanks for reporting. Around that time this

[akka-user] Akka FSM stateTimeout seems broken.

2015-04-03 Thread folex
sealed trait State import scala.concurrent.duration._ import akka.actor._ sealed trait Data case object Initial extends State case object Waiting extends State case object Empty extends Data class FSMActor extends LoggingFSM[State, Data] { startWith(Initial, Empty)

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-03 Thread Akka Team
Hi folex, thanks for reporting. Around that time this commit was merged into FSM https://github.com/akka/akka/commit/2c88bb116903b42decb9d8063dc410325a9b9d29 which indeed changes semantics of `stay()` slightly (see documentation). It changed when state transitions are triggered (the events). I

Re: [akka-user] Akka FSM stateTimeout seems broken.

2015-04-03 Thread Akka Team
When thinking about it again it, I think we need to document properly how timeouts when both stateTimeout and forMax is used, and then make it so. Currently it’s not very well defined. In your case, when you change stateTimeouts I’d personally not use stateTimeout but always forMax(), which ends