prevent "shutdown" when server didn't come up

This commit is contained in:
Eugene Yokota 2017-12-05 06:32:50 -05:00
parent 4c435a5adb
commit 2b2c1f0568
1 changed files with 3 additions and 1 deletions

View File

@ -152,11 +152,13 @@ private[sbt] final class CommandExchange {
Await.ready(x.ready, Duration("10s"))
x.ready.value match {
case Some(Success(_)) =>
// rememeber to shutdown only when the server comes up
server = Some(x)
case Some(Failure(e)) =>
s.log.error(e.toString)
server = None
case None => // this won't happen because we awaited
}
server = Some(x)
}
s
}