所以我有这段代码
def receive = identifying
def identifying: Actor.Receive = {
case ActorIdentity(`path`, Some(actor)) =>
context.watch(actor)
context.become(active(actor))
logger.info(s"Identifying actor: $path")
case ActorIdentity(`path`, None) =>
logger.info(s"Remote actor not available: $path")
case ReceiveTimeout =>
sendIdentifyRequest()
case _ =>
logger.info("Not ready yet")
}
然而,当我发送识别信息(这是正确的路径)时,它没有获得一个ActorIdentity,它只是打印"尚未准备好"。
当我在本地运行服务器时,一切正常。所以我真的很困惑为什么服务器按预期工作。