enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.31k stars 317 forks source link

Local projects leak PM connections #10381

Open farmaazon opened 5 days ago

farmaazon commented 5 days ago

Opening multiple local projects results in periodically reconnects with previous ws connectors.

  1. Open a local project.
  2. Close it
  3. Open another one. In console you will get WebSocket connection to 'ws://127.0.0.1:59040/' failed: to previous project url
  4. Close and open another one. Now you will have 2 intervals trying to reconnect with previous urls

https://github.com/enso-org/cloud-v2/assets/2855109/4727cd7b-9ca9-471f-af80-f440d7e4c1af

farmaazon commented 5 days ago

Two observations:

  1. Sometimes, the language server is torn down before GUI will do its clean-up; so we try to reconnect only to destroy execution context, for example. But here we give up after a few retries and there's silence in the logs.
  2. However, when another/same project will be opened, the log with errors appears again, this time indefinitely.