activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject git commit: Fixing AMQ-4892: MQTT clients disconnecting due to socket error do not publish the configured last will and testament message.
Date Fri, 15 Nov 2013 20:51:40 GMT
Updated Branches:
  refs/heads/trunk a46db89b2 -> 030c2cca3


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

Branch: refs/heads/trunk
Commit: 030c2cca31fa41dc938b7a6a5904c90bfce6dfac
Parents: a46db89
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Fri Nov 15 15:51:15 2013 -0500
Committer: Hiram Chirino <hiram@hiramchirino.com>
Committed: Fri Nov 15 15:51:15 2013 -0500

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


http://git-wip-us.apache.org/repos/asf/activemq/blob/030c2cca/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