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
stateTimeouts(currentState.stateName): Some(5 seconds)
fsm got StateTimeout :(

currentState.stateName: Waiting
nextState.notifies: false
currentState.timeout: None
stateTimeouts(currentState.s)
fsm got StateTimeout :(

It looks to me that this line of code is the offending line:

val timeout = if (currentState.timeout.isDefined) currentState.timeout else 
stateTimeouts(currentState.stateName)

https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/FSM.scala#L651

And this map includes that value (5 seconds) due to the call to `when`

https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/FSM.scala#L313-L314

which calls:

https://github.com/akka/akka/blob/master/akka-actor/src/main/scala/akka/actor/FSM.scala#L533-L541

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to