Skip to content

Commit

Permalink
#752 Catch stashed lifecycle event from starting if not used (#753)
Browse files Browse the repository at this point in the history
* Invoke Github Actions

* #750: Fixed future handling in said test.

* #752: Fixed extra dead letter on PerpetualStream startup.
  • Loading branch information
akara authored Mar 10, 2022
1 parent 8074371 commit 7dba345
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request
name: Build
'on':
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ trait PerpetualStreamBase[T] extends Actor with ActorLogging with Stash with Gra

final def starting: Receive = {
case `streamRunLifecycleState` =>
context.become(running orElse flowMatValue orElse receive)
context.become(running orElse flowMatValue orElse receive orElse catchAnyLifecycleState)
matValueOption = Option(runGraph())
unstashAll()
case _ => stash()
Expand All @@ -96,6 +96,10 @@ trait PerpetualStreamBase[T] extends Actor with ActorLogging with Stash with Gra
final def flowMatValue: Receive = {
case MatValueRequest => sender() ! matValue
}

final def catchAnyLifecycleState: Receive = {
case _: LifecycleState => // Stashed lifecycle states without meaning or anyone caring should be ignored.
}
}

case object MatValueRequest {
Expand Down

0 comments on commit 7dba345

Please sign in to comment.