diff --git a/metals/src/main/scala/scala/meta/internal/metals/Tables.scala b/metals/src/main/scala/scala/meta/internal/metals/Tables.scala index d6649b81e17..b51a7d9680a 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/Tables.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/Tables.scala @@ -177,7 +177,7 @@ final class Tables( val formatVersionChangedMessage = "The write format 2 is smaller than the supported format 3" try { - DriverManager.getConnection(url, user, null) + DriverManager.getConnection(url, user, null).close() } catch { case e: SQLException if e.getErrorCode() == 90048 => e.getCause() match {