-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[grid] close the HttpClient after the session is gone #16182
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||
3bcf237 to
dd5d53e
Compare
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
User description
🔗 Related Issues
We had some reports about leaking threads in the Router in the past.
💥 What does this PR do?
Close the HttpClient after use.
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Bug fix
Description
Fix HttpClient resource leak in Grid sessions
Add proper close() method to ReverseProxyHandler
Ensure HttpClient cleanup when sessions end
Update session factories to call super.stop()
Diagram Walkthrough
File Walkthrough
DefaultActiveSession.java
Implement proper session cleanupjava/src/org/openqa/selenium/grid/node/DefaultActiveSession.java
DriverServiceSessionFactory.java
Fix session stop sequencejava/src/org/openqa/selenium/grid/node/config/DriverServiceSessionFactory.java
DockerSession.java
Add parent stop calljava/src/org/openqa/selenium/grid/node/docker/DockerSession.java
HandleSession.java
Document close behaviorjava/src/org/openqa/selenium/grid/router/HandleSession.java
ReverseProxyHandler.java
Add AutoCloseable implementationjava/src/org/openqa/selenium/grid/web/ReverseProxyHandler.java