Skip to content

Commit

Permalink
improvement: add timeout to fix java version for sbt request
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Oct 5, 2023
1 parent e3b108a commit 52138d0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.Path
import java.util.Properties
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException

import scala.concurrent.ExecutionContext
import scala.concurrent.Future
Expand Down Expand Up @@ -206,6 +208,8 @@ case class SbtBuildTool(
shutdownBspServer(shellRunner).ignoreValue
case _ => Future.successful(())
}
.withTimeout(10, TimeUnit.SECONDS)
.recover { case _: TimeoutException => Future.successful(()) }
}
}

Expand Down

0 comments on commit 52138d0

Please sign in to comment.