Fixing pointless error on ask timeout completion
This commit is contained in:
parent
445ffa3a7d
commit
8248379f92
1 changed files with 1 additions and 1 deletions
|
|
@ -191,7 +191,7 @@ trait AskSupport {
|
|||
val result = Promise[Any]()(provider.dispatcher)
|
||||
val a = new PromiseActorRef(provider, path, provider.tempContainer, result, provider.deathWatch)
|
||||
provider.registerTempActor(a, path)
|
||||
val f = provider.scheduler.scheduleOnce(timeout.duration) { result.failure(new AskTimeoutException("Timed out")) }
|
||||
val f = provider.scheduler.scheduleOnce(timeout.duration) { result.tryComplete(Left(new AskTimeoutException("Timed out"))) }
|
||||
result onComplete { _ ⇒
|
||||
try { a.stop(); f.cancel() }
|
||||
finally { provider.unregisterTempActor(path) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue