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

#571 Properly dispose temporary configuration session injectors #151

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

tortmayr
Copy link
Contributor

@tortmayr tortmayr commented Mar 5, 2022

Refactor the initial configuration of the DefaultServerGsonConfigurator to actually create temporary client sessions to retrieve the corresponding ServerConfigurationContribution. This session can then be safely disposed once its no longer needed (i.e. the configuration is completed).
By disposing the client session we ensure that all temporary created resources like the ActionDispatcher (thread) are properly disposed.
In addition, the acutal configuration logic is refactored into a protected method that is called from the constructor. This makes it easier for subclasses to customize the configuration behavior.

Fixes eclipse-glsp/glsp/issues/571

Refactor the  initial configuration of the `DefaultServerGsonConfigurator` to actually create temporary client sessions to retrieve the corresponding `ServerConfigurationContribution`. This session can then be safely disposed once its no longer needed (i.e. the configuration is completed).
By disposing the client session we ensure that all temporary created resources like the `ActionDispatcher` (thread) are properly disposed.
In addition, the acutal configuration logic is refactored into a protected method that is called from the constructor. This makes it easier for subclasses to customize the configuration behavior.

Fixes eclipse-glsp/glsp/issues/571
Copy link

@ivy-lli ivy-lli left a comment

Choose a reason for hiding this comment

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

Thanks for the fix

Copy link
Contributor

@martin-fleck-at martin-fleck-at left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you Tobias!

@tortmayr tortmayr merged commit 319a1f9 into master Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global ActionDispatcher Thread is started for each connection and will never be stopped
3 participants