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

Add shutdown hook to close AsyncHttpClient. #8763

Merged
merged 2 commits into from
Oct 13, 2020

Conversation

pujagani
Copy link
Contributor

@pujagani pujagani commented Oct 7, 2020

Add Threadfactory to AsyncHttpClient to update threadfactory to use daemon threads.

Description

The changes are related to issue #8159.

Motivation and Context

The AsyncHttpClient uses non-daemon long-running threads. When the program finishes, these threads prevent the JVM from shutting down. Hence, the AsyncHttpClient was not closed. Thus, the application cannot exit.
The changes make the AsyncHttpClient threads as daemon threads. So now the JVM can exit and initiate shutdown. Additionally, the changes add a shutdown hook to close the client.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…cHttpClient to update threadfactory to use daemon threads.
Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @pujagani!

@diemol diemol merged commit cc1ac60 into SeleniumHQ:trunk Oct 13, 2020
k7z45 pushed a commit to k7z45/selenium that referenced this pull request Oct 20, 2020
…cHttpClient to update threadfactory to use daemon threads. (SeleniumHQ#8763)

Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants