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 d85707f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import scala.meta.io.AbsolutePath

import org.eclipse.lsp4j.Position
import org.eclipse.lsp4j.services.LanguageClient
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException

case class SbtBuildTool(
workspaceVersion: Option[String],
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 d85707f

Please sign in to comment.