From aa2c8965eb51c411e8db0b98cab07aef4ff4ce26 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Wed, 19 Mar 2008 16:26:53 +0000 Subject: [PATCH] use compareAndSet() in onException git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@638922 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/transport/InactivityMonitor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java b/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java index 0a06ee912c..41d1dd64dd 100755 --- a/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java +++ b/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java @@ -246,7 +246,7 @@ public class InactivityMonitor extends TransportFilter { public void onException(IOException error) { closeDown(); - if (!failed.getAndSet(true)) { + if (!failed.compareAndSet(false,true)) { transportListener.onException(error); } }