activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [1/2] git commit: avoid npe on network bridge failure, dispose when not started on vm transport
Date Thu, 09 Oct 2014 12:49:06 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk ad770ea79 -> 97c127d2d


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/a56996dd
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a56996dd
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a56996dd

Branch: refs/heads/trunk
Commit: a56996dd6cc1249223899555ae2e6c66d7acb9e2
Parents: ad770ea
Author: gtully <gary.tully@gmail.com>
Authored: Thu Oct 9 13:44:30 2014 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Oct 9 13:44:30 2014 +0100

----------------------------------------------------------------------
 .../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/a56996dd/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