Skip to content

Commit

Permalink
🐛 Fix actor linking
Browse files Browse the repository at this point in the history
  • Loading branch information
pron committed May 24, 2017
1 parent 0b8081d commit 2f0628f
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -899,20 +899,17 @@ final void checkThrownIn0() {
public final Actor link(ActorRef other) {
final ActorImpl other1 = getActorRefImpl(other);
record(1, "Actor", "link", "Linking actors %s, %s", this, other1);
if (this.isDone()) {
other1.getLifecycleListener().dead(ref, getDeathCause());
} else {
observed.add(other);
addLifecycleListener(other1.getLifecycleListener());

other1.linked(myRef());
}

this.linked(other);
other1.linked(myRef());

return this;
}

@Override
protected void linked(ActorRef actor) {
observed.add(actor);
if (!this.isDone())
observed.add(actor);
addLifecycleListener(getActorRefImpl(actor).getLifecycleListener());
}

Expand Down

0 comments on commit 2f0628f

Please sign in to comment.