Skip to content

Commit

Permalink
fix: only setFailed when actor not null (#1399)
Browse files Browse the repository at this point in the history
* fix: only setFailed when actor not null

* chore: use ne rather than !=
  • Loading branch information
Roiocam authored Jul 18, 2024
1 parent 73c9362 commit 0153485
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,7 @@ private[pekko] class ActorCell(
Thread.currentThread().interrupt()
throw ActorInitializationException(self, "interruption during creation", e)
case NonFatal(e) =>
if (actor == null) setFailed(system.deadLetters)
else setFailed(actor.self)
if (actor ne null) setFailed(actor.self)
failActor()
e match {
case i: InstantiationException =>
Expand Down

0 comments on commit 0153485

Please sign in to comment.