You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/11/04 09:45:35 UTC

[camel] branch camel-2.19.x updated (fd06a74 -> 7c7b1aa)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch camel-2.19.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from fd06a74  CAMEL-11986: HTTP4 Producer for TLS schemes tra...
     new 857c66b  CAMEL-11628: camel-mqtt - Fix in MQTTEndpoint for connection loop bug.
     new 7c7b1aa  Fixed CS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].

[camel] 02/02: Fixed CS

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.19.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7c7b1aa74ccca360994eeef0eef6d99d88a48ccf
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 4 10:44:52 2017 +0100

    Fixed CS
---
 .../src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
index 3dce618..72a8e61 100644
--- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
+++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
@@ -236,7 +236,7 @@ public class MQTTEndpoint extends DefaultEndpoint implements AsyncEndpoint {
             // Without this, the fusesource MQTT client seems to be holding the old connection object, and connection contention can ensue.
             connection.disconnect(null);
         }
-    	
+
         connection = configuration.callbackConnection();
 
         connection.listener(new Listener() {

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.

[camel] 01/02: CAMEL-11628: camel-mqtt - Fix in MQTTEndpoint for connection loop bug.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.19.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 857c66b7b7433bb768e321948da4e6f1af50bd11
Author: Brad Powell <ba...@sbcglobal.net>
AuthorDate: Fri Nov 3 11:36:56 2017 -0500

    CAMEL-11628: camel-mqtt - Fix in MQTTEndpoint for connection loop bug.
---
 .../main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
index 511c3c5..3dce618 100644
--- a/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
+++ b/components/camel-mqtt/src/main/java/org/apache/camel/component/mqtt/MQTTEndpoint.java
@@ -231,6 +231,12 @@ public class MQTTEndpoint extends DefaultEndpoint implements AsyncEndpoint {
     }
 
     protected void createConnection() {
+        if (connection != null) {
+            // In connect(), in the connection.connect() callback, onFailure() doesn't seem to ever be called, so forcing the disconnect here.
+            // Without this, the fusesource MQTT client seems to be holding the old connection object, and connection contention can ensue.
+            connection.disconnect(null);
+        }
+    	
         connection = configuration.callbackConnection();
 
         connection.listener(new Listener() {
@@ -331,7 +337,7 @@ public class MQTTEndpoint extends DefaultEndpoint implements AsyncEndpoint {
 
             }
 
-            public void onFailure(Throwable value) {
+            public void onFailure(Throwable value) {  // this doesn't appear to ever be called
                 LOG.warn("Failed to connect to " + configuration.getHost() + " due " + value.getMessage());
                 promise.onFailure(value);
                 connection.disconnect(null);

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <co...@camel.apache.org>.