From bf47a16447ed22dd31bc6445da6d8f8793e0ad98 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Fri, 11 Jan 2013 09:55:42 +0100 Subject: [PATCH] Throw startup exception from Remoting, see #2872 * The problem with NPE of defaultAddress was because if the init of the transport takes long time (network timeout) the defaultAddress was never set --- akka-remote/src/main/scala/akka/remote/Remoting.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/akka-remote/src/main/scala/akka/remote/Remoting.scala b/akka-remote/src/main/scala/akka/remote/Remoting.scala index be9ff83684..ba13dd2314 100644 --- a/akka-remote/src/main/scala/akka/remote/Remoting.scala +++ b/akka-remote/src/main/scala/akka/remote/Remoting.scala @@ -202,8 +202,12 @@ private[remote] class Remoting(_system: ExtendedActorSystem, _provider: RemoteAc eventPublisher.notifyListeners(RemotingListenEvent(addresses)) } catch { - case e: TimeoutException ⇒ notifyError("Startup timed out", e) - case NonFatal(e) ⇒ notifyError("Startup failed", e) + case e: TimeoutException ⇒ + notifyError("Startup timed out", e) + throw e + case NonFatal(e) ⇒ + notifyError("Startup failed", e) + throw e } case Some(_) ⇒