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

Fix possible concurrent issue with SSL & default connector #5794

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from

Conversation

jansupol
Copy link
Contributor

@jansupol jansupol commented Nov 8, 2024

No description provided.

@@ -387,6 +387,10 @@ private ClientResponse _apply(final ClientRequest request) throws IOException {
sniUri = request.getUri();
}

if (!DEFAULT_SSL_SOCKET_FACTORY.isInitialized() && "HTTPS".equalsIgnoreCase(sniUri.getScheme())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

The check !DEFAULT_SSL_SOCKET_FACTORY.isInitialized() seems to be not thread-save?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The variable used in isInitialized() is volatile, so it should be thread-safe.

@senivam senivam linked an issue Nov 13, 2024 that may be closed by this pull request
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.

Jersey core client 3.1.9 memory leak
2 participants