Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-6499: Explicitly close the socket onStop in electron #6681

Merged
merged 1 commit into from
Dec 4, 2019
Merged

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Dec 3, 2019

Otherwise, the channels will be closed with a checkAliveTimeout delay
in the electron application, when refreshing the browser window.

Closes: #6499

Signed-off-by: Akos Kitta kittaakos@typefox.io

What it does

  • It explicitly closes the websocket channels in the electron applicationn when the frontend application is stopping. This ensures, any backend resources can be released when the browser window is reloaded/unloaded.
  • Alignned the SIW service path: /search-in-workspace -> /services/search-in-workspace.
  • Added debug logging when channels are opened and closed.

How to test

I do not have a clean way to verify it, but you can add some logging to backend on JsonRpcProxy#onDidCloseConnection. See #6499.

Review checklist

Reminder for reviewers

I am going to verify the behavior on Windows.

Otherwise, the channels will be closed with a `checkAliveTimeout` delay
in the electron application, when refreshing the browser window.

Closes: #6499

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
@kittaakos
Copy link
Contributor Author

I am going to verify the behavior on Windows.

It works.

@akosyakov akosyakov added electron issues related to the electron target messaging issues related to messaging labels Dec 4, 2019
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have verified for regression in the browser target. It looks good, the client still can reconnect and i don't see any error like ws channel has been already closed.

@kittaakos kittaakos merged commit d5c8110 into master Dec 4, 2019
@kittaakos kittaakos deleted the GH-6499 branch December 4, 2019 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron issues related to the electron target messaging issues related to messaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[electron] JsonRpcProxy#onDidCloseConnection is not invoked when refreshing the browser window
2 participants