Propagate statusPromise down to the actual change in throttler, see #2877

* added some missing copyright headers
This commit is contained in:
Patrik Nordwall 2013-01-08 11:48:50 +01:00
parent 7944b456fc
commit 9c1a00d020
16 changed files with 85 additions and 22 deletions

View file

@ -1,3 +1,6 @@
/**
* Copyright (C) 2009-2012 Typesafe Inc. <http://www.typesafe.com>
*/
package akka.remote
import scala.language.postfixOps
@ -400,7 +403,12 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
val accepting: Receive = {
case ManagementCommand(cmd, statusPromise)
transportMapping.values foreach { _.managementCommand(cmd, statusPromise) }
val allStatuses = transportMapping.values map { transport
val p = Promise[Boolean]()
transport.managementCommand(cmd, p)
p.future
}
statusPromise completeWith Future.fold(allStatuses)(true)(_ && _)
case s @ Send(message, senderOption, recipientRef)
val recipientAddress = recipientRef.path.address