activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [7/8] activemq git commit: avoid npe on network bridge failure, dispose when not started on vm transport
Date Thu, 18 Dec 2014 03:17:40 GMT
avoid npe on network bridge failure, dispose when not started on vm transport


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/c52c4ed0
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/c52c4ed0
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/c52c4ed0

Branch: refs/heads/activemq-5.10.x
Commit: c52c4ed0f850b1b1b0e58cdfba4332d18576627e
Parents: 1a24160
Author: gtully <gary.tully@gmail.com>
Authored: Thu Oct 9 13:44:30 2014 +0100
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Wed Dec 17 21:53:13 2014 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/activemq/transport/vm/VMTransport.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/c52c4ed0/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
index ba6ed13..ef1b1e2 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
@@ -171,7 +171,7 @@ public class VMTransport implements Transport, Task {
     public void stop() throws Exception {
         // Only need to do this once, all future oneway calls will now
         // fail as will any asnyc jobs in the task runner.
-        if (disposed.compareAndSet(false, true)) {
+        if (disposed.compareAndSet(false, true) && started.get()) {
 
             TaskRunner tr = taskRunner;
             LinkedBlockingQueue<Object> mq = this.messageQueue;


Mime
View raw message