Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix possible concurrent issue with SSL & default connector #5794

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>
# for free to join this conversation on GitHub. Already have an account? # 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