activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject [10/18] git commit: Fixing AMQ-4892: MQTT clients disconnecting due to socket error do not publish the configured last will and testament message.
Date Wed, 12 Mar 2014 17:06:49 GMT
Fixing AMQ-4892: MQTT clients disconnecting due to socket error do not publish the configured
last will and testament message.


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

Branch: refs/heads/activemq-5.9
Commit: e179a72ee39c163c3acedc9319ed5892d698c028
Parents: 16911d5
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Fri Nov 15 15:51:15 2013 -0500
Committer: Hadrian Zbarcea <hadrian@apache.org>
Committed: Wed Mar 12 12:09:21 2014 -0400

----------------------------------------------------------------------
 .../apache/activemq/transport/mqtt/MQTTInactivityMonitor.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/e179a72e/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTInactivityMonitor.java
----------------------------------------------------------------------
diff --git a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTInactivityMonitor.java
b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTInactivityMonitor.java
index 3e39876..c2f3041 100644
--- a/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTInactivityMonitor.java
+++ b/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTInactivityMonitor.java
@@ -126,9 +126,6 @@ public class MQTTInactivityMonitor extends TransportFilter {
             }
             ASYNC_TASKS.execute(new Runnable() {
                 public void run() {
-                    if (protocolConverter != null) {
-                        protocolConverter.onTransportError();
-                    }
                     onException(new InactivityIOException("Channel was inactive for too (>"
+ readCheckTime + ") long: " + next.getRemoteAddress()));
                 }
             });
@@ -172,6 +169,10 @@ public class MQTTInactivityMonitor extends TransportFilter {
     public void onException(IOException error) {
         if (failed.compareAndSet(false, true)) {
             stopMonitorThread();
+            if (protocolConverter != null) {
+                protocolConverter.onTransportError();
+            }
+            protocolConverter.onTransportError();
             transportListener.onException(error);
         }
     }


Mime
View raw message