Skip to content

Properly synchronize access to httpClientBuilder_ - #1015

Merged
rbri merged 2 commits into
HtmlUnit:masterfrom
rschwietzke:1014-incorrect-threadlocal-implementation
Sep 6, 2025
Merged

Properly synchronize access to httpClientBuilder_#1015
rbri merged 2 commits into
HtmlUnit:masterfrom
rschwietzke:1014-incorrect-threadlocal-implementation

Conversation

@rschwietzke

Copy link
Copy Markdown
Contributor

Add the needed synchronized semantics

@rschwietzke

Copy link
Copy Markdown
Contributor Author

Closes #1014

* @return the initialized HTTP client
*/
protected HttpClientBuilder getHttpClientBuilder() {
protected synchronized HttpClientBuilder getHttpClientBuilder() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rschwietzke is this correct, in the other cases we sync on the httpClientBuilder_ object and in this case on the HttpWebConnection. My guess is we should always sync on the httpClientBuilder_.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You are right. That was not fully correct, but might have worked somehow. ;) PR updates

@rbri
rbri merged commit 3bd078d into HtmlUnit:master Sep 6, 2025
5 of 7 checks passed
@rbri

rbri commented Sep 6, 2025

Copy link
Copy Markdown
Member

merged, thanks....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants