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:
parent
12ff07f025
commit
e054816047
11 changed files with 325 additions and 241 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue