Merge pull request #18430 from akka/wip-17317-attaching-conductor-patriknw

=mnt #17317 Harden reconnect when attaching to test conductor
This commit is contained in:
Patrik Nordwall 2015-09-09 19:05:19 +02:00
commit fd381df392
2 changed files with 4 additions and 3 deletions

View file

@ -25,7 +25,7 @@ akka {
connect-timeout = 20s
# Number of connect attempts to be made to the conductor controller
client-reconnects = 10
client-reconnects = 30
# minimum time interval which is to be inserted between reconnect attempts
reconnect-backoff = 1s

View file

@ -162,10 +162,11 @@ private[akka] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress)
case Event(Connected(channel), _)
channel.write(Hello(name.name, TestConductor().address))
goto(AwaitDone) using Data(Some(channel), None)
case Event(_: ConnectionFailure, _)
case Event(e: ConnectionFailure, _)
log.error(e, "ConnectionFailure")
goto(Failed)
case Event(StateTimeout, _)
log.error("connect timeout to TestConductor")
log.error("Failed to connect to test conductor within {} ms.", settings.ConnectTimeout.toMillis)
goto(Failed)
}