You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2021/06/18 21:14:39 UTC

[GitHub] [httpcomponents-core] ok2c commented on a change in pull request #293: Fix data race in StrictConnPool

ok2c commented on a change in pull request #293:
URL: https://github.com/apache/httpcomponents-core/pull/293#discussion_r654357416



##########
File path: httpcore5/src/main/java/org/apache/hc/core5/pool/StrictConnPool.java
##########
@@ -699,14 +699,18 @@ public boolean isDone() {
         }
 
         public void failed(final Exception ex) {
-            if (this.completed.compareAndSet(false, true)) {
-                this.ex = ex;
+            synchronized (this.completed) {

Review comment:
       @rschmitt Could you please give some details about the race? 
   If we abolutely have to synchronize here the use of AtomicBoolean for that end feels wrong. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org