From 37b8524dedbc7fd9a7f00a6b63b5be4eeb46b91c Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Thu, 20 May 2010 20:35:36 +0200 Subject: [PATCH] Fixed cluster --- akka-core/src/main/scala/remote/Cluster.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/akka-core/src/main/scala/remote/Cluster.scala b/akka-core/src/main/scala/remote/Cluster.scala index 366fec842d..e2634b5c5d 100644 --- a/akka-core/src/main/scala/remote/Cluster.scala +++ b/akka-core/src/main/scala/remote/Cluster.scala @@ -249,9 +249,11 @@ object Cluster extends Cluster with Logging { try { name map { fqn => - val a = Class.forName(fqn).newInstance.asInstanceOf[ClusterActor] - a setSerializer serializer - Actor.actorOf(a) + Actor.actorOf({ + val a = Class.forName(fqn).newInstance.asInstanceOf[ClusterActor] + a setSerializer serializer + a + }) } } catch { @@ -288,7 +290,7 @@ object Cluster extends Cluster with Logging { actorRef <- createClusterActor(serializerClassLoader getOrElse getClass.getClassLoader) sup <- createSupervisor(actorRef) } { - clusterActorRef = Some(actorRef) + clusterActorRef = Some(actorRef.start) clusterActor = Some(actorRef.actor.asInstanceOf[ClusterActor]) sup.start }