make failure injection idempotent

- instead of creating local top-level actors per pipeline, just create
  one system actor through which everything is sent
- this enables storing settings (like what to throttle how) within this
  actor and applying settings when connections come up later
- it also gets rid of the blocking actor creation from
  NetworkFailureInjector, fixing the dead-lock
- moved also the ServerFSMs to be children of the Controller
- all actors have proper names now for easier debugging
This commit is contained in:
Roland 2012-05-24 10:56:32 +02:00
parent 12ff07f025
commit e054816047
11 changed files with 325 additions and 241 deletions

View file

@ -173,6 +173,7 @@ class ActiveRemoteClient private[akka] (
notifyListeners(RemoteClientError(connection.getCause, netty, remoteAddress))
false
} else {
ChannelAddress.set(connection.getChannel, Some(remoteAddress))
sendSecureCookie(connection)
notifyListeners(RemoteClientStarted(netty, remoteAddress))
true
@ -196,8 +197,10 @@ class ActiveRemoteClient private[akka] (
notifyListeners(RemoteClientShutdown(netty, remoteAddress))
try {
if ((connection ne null) && (connection.getChannel ne null))
if ((connection ne null) && (connection.getChannel ne null)) {
ChannelAddress.remove(connection.getChannel)
connection.getChannel.close()
}
} finally {
try {
if (openChannels ne null) openChannels.close.awaitUninterruptibly()