-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix custom SSLSocketFactory not being set because of an unsafe lazy-i…
…nitialization in JDK (#4566) * Avoid unsafe lazy-initialization for SSL sockets This prevents calling HttpsURLConnection.getDefaultSSLSocketFactory() in an unsafe manner due to the poorly implemented lazy-initialization on the JDK. When multiple threads call that method concurrently (calling secureConnection()) the SSLSocketFactory is instantiated two times, making one thread fail the check and overriding the custom socket factory with the default one. Also-by: Kevin Conaway <[email protected]> Signed-off-by: Adrian Haasler García <[email protected]>
- Loading branch information
Showing
2 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters