8000 Fix possible concurrent issue with SSL & default connector by jansupol · Pull Request #5794 · eclipse-ee4j/jersey · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix possible concurrent issue with SSL & default connector #5794

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

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

jansupol
Copy link
Contributor
@jansupol jansupol commented Nov 8, 2024

No description provided.

Signed-off-by: jansupol <jan.supol@oracle.com>
@jansupol jansupol force-pushed the connector.concurrent branch from addb97a to bdb97fc Compare November 8, 2024 22:06
@@ -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
Signed-off-by: jansupol <jan.supol@oracle.com>
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
4 participants
0