Skip to content

Commit

Permalink
log the cause for bsp connection failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mzarnowski committed Sep 23, 2019
1 parent 35ce5fc commit 78875e9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ final class BloopServers(
maxRetries: Int = defaultRetries
): Future[Option[BuildServerConnection]] = {
newServerUnsafe().map(Option(_)).recoverWith {
case NonFatal(_) if maxRetries > 0 =>
scribe.warn(s"BSP retry ${defaultRetries - maxRetries + 1}")
case NonFatal(e) if maxRetries > 0 =>
val retry = defaultRetries - maxRetries + 1
val cause = e.getMessage
scribe.warn(s"BSP retry $retry due to: $cause", e)
newServer(maxRetries - 1)
}
}
Expand Down

0 comments on commit 78875e9

Please sign in to comment.