enso/lib/scala
Hubert Plociniczak 9252eb5f3a
Delay LS shutdown when last client disconnects (#7254)
* Delay LS shutdown when last client disconnects

Rather than closing Language Server immediately, we delay the shutdown
until some timeout hits. This gives a chance for new clients to connect
without paying the price of the initialization again.

More importantly, during hibernation/restart, the connection between
client (IDE) and LS is severed so it appears as if client disconnect. In
fact a few moments later IDE would attempt to re-establish the
connection on the same port. Without this change, LS shutsdown and
further attempts to connect on that particular port will fail.

There are still problems on the IDE-side after waking up from
hibernation but it is not related to Language Server.

* Introduce a separate timeout for delayed shutdown

Can't/shouldn't use the same timeout value as for shutdown timeout for
delaying shutdowns initiated by lack of clients.

* Add test demonstrating the new functionality
2023-07-18 08:37:11 +02:00
..
akka-native/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
cli/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
common-polyglot-core-utils/src/main/java/org/enso/polyglot/common_utils First part of AWS S3 API, various small fixes. (#6973) 2023-06-15 16:20:13 +00:00
connected-lock-manager/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
distribution-manager/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
downloader/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
edition-updater/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
edition-uploader/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
editions/src Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
interpreter-dsl/src/main/java/org/enso/interpreter/dsl Builtin methods can support array-like arguments (#7235) 2023-07-17 09:17:39 +02:00
json-rpc-server Initialize Language Server's JSON RPC protocol asynchronously (#7232) 2023-07-07 11:49:23 +00:00
json-rpc-server-test Initialize Language Server's JSON RPC protocol asynchronously (#7232) 2023-07-07 11:49:23 +00:00
library-manager/src Reload project's config on rename (#7179) 2023-07-03 09:36:19 +00:00
library-manager-test/src Optimize import/export resolution (#5700) 2023-03-01 08:53:29 +00:00
locking-test-helper/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
logger enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
logging-service/src Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
logging-truffle-connector/src/main Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
logging-utils/src enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
pkg Add endpoint for downloading a project (#7291) 2023-07-14 13:18:08 +00:00
profiling-utils/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00
project-manager Delay LS shutdown when last client disconnects (#7254) 2023-07-18 08:37:11 +02:00
runtime-version-manager/src Simplify onboarding instructions for engine & project-manager developers (#7181) 2023-07-17 17:38:54 +00:00
runtime-version-manager-test/src Simplify onboarding instructions for engine & project-manager developers (#7181) 2023-07-17 17:38:54 +00:00
searcher/src Do not return getters from global completion response (#7007) 2023-06-12 12:28:35 +00:00
syntax Moving construction of IR into runtime parser project (#7096) 2023-06-24 06:34:21 +02:00
task-progress-notifications/src/main/scala/org/enso/cli/task/notifications Scala 2.13.11 and libraries update (#7010) 2023-06-14 13:15:57 +00:00
testkit/src/main Mark some tests as (unconditonally) flaky (#6453) 2023-04-27 17:09:46 +02:00
text-buffer/src Add fileModifiedOnDisk notification (#7239) 2023-07-10 16:50:14 +00:00
version-output/src/main enso4igv can open engine/language-server & co. projects (#4098) 2023-01-31 08:40:04 +00:00