Hardened flushing code in Remoting #3036

This commit is contained in:
Endre Sándor Varga 2013-02-25 12:11:39 +01:00
parent b0baba3362
commit 330b1cd627
5 changed files with 34 additions and 6 deletions

View file

@ -454,7 +454,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
// Shutdown all endpoints and signal to sender when ready (and whether all endpoints were shut down gracefully)
val sys = context.system // Avoid closing over context
Future sequence endpoints.allEndpoints.map {
gracefulStop(_, settings.FlushWait)(sys)
gracefulStop(_, settings.FlushWait, EndpointWriter.FlushAndStop)(sys)
} map { _.foldLeft(true) { _ && _ } } pipeTo sender
// Ignore all other writes
context.become(flushing)