Use whileOff instead of fold to avoid confusion, see #2552
This commit is contained in:
parent
85a4743a47
commit
7779e49312
1 changed files with 7 additions and 8 deletions
|
|
@ -69,14 +69,13 @@ private[akka] class RemoteSystemDaemon(system: ActorSystemImpl, _path: ActorPath
|
||||||
// TODO RK canonicalize path so as not to duplicate it always #1446
|
// TODO RK canonicalize path so as not to duplicate it always #1446
|
||||||
val subpath = elems.drop(1)
|
val subpath = elems.drop(1)
|
||||||
val path = this.path / subpath
|
val path = this.path / subpath
|
||||||
terminating.fold(
|
val isTerminating = !terminating.whileOff {
|
||||||
log.debug("Skipping [{}] to RemoteSystemDaemon on [{}] while terminating", message, path.address)) {
|
val actor = system.provider.actorOf(system, props, supervisor.asInstanceOf[InternalActorRef],
|
||||||
|
path, systemService = false, Some(deploy), lookupDeploy = true, async = false)
|
||||||
val actor = system.provider.actorOf(system, props, supervisor.asInstanceOf[InternalActorRef],
|
addChild(subpath.mkString("/"), actor)
|
||||||
path, systemService = false, Some(deploy), lookupDeploy = true, async = false)
|
actor.sendSystemMessage(Watch(actor, this))
|
||||||
addChild(subpath.mkString("/"), actor)
|
}
|
||||||
actor.sendSystemMessage(Watch(actor, this))
|
if (isTerminating) log.error("Skipping [{}] to RemoteSystemDaemon on [{}] while terminating", message, path.address)
|
||||||
}
|
|
||||||
case _ ⇒
|
case _ ⇒
|
||||||
log.error("remote path does not match path from message [{}]", message)
|
log.error("remote path does not match path from message [{}]", message)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue