diff --git a/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java b/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java index 18d0ee9e650..a4e706afeda 100644 --- a/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java +++ b/src/main/java/com/github/_1c_syntax/bsl/languageserver/context/ServerContext.java @@ -190,12 +190,16 @@ private Configuration computeConfigurationMetadata() { } Configuration configuration; - ForkJoinPool customThreadPool = new ForkJoinPool(); + var customThreadPool = new ForkJoinPool(); try { - configuration = customThreadPool.submit(() -> Configuration.create(configurationRoot)).fork().join(); - } catch (RuntimeException e) { + configuration = customThreadPool.submit(() -> Configuration.create(configurationRoot)).get(); + } catch (ExecutionException e) { LOGGER.error("Can't parse configuration metadata. Execution exception.", e); configuration = Configuration.create(); + } catch (InterruptedException e) { + LOGGER.error("Can't parse configuration metadata. Interrupted exception.", e); + configuration = Configuration.create(); + Thread.currentThread().interrupt(); } return configuration;