camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: CAMEL-9035: camel-smpp should only clear session if was success to close. Otherwise it cannot try again on next attempt to close it. Thanks to Imram for the patch.
Date Fri, 31 Jul 2015 11:07:02 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x a0dac50e7 -> 6d2f8e19c
  refs/heads/master 0d24370a7 -> 7c813bd3d


CAMEL-9035: camel-smpp should only clear session if was success to close. Otherwise it cannot
try again on next attempt to close it. Thanks to Imram for the patch.


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

Branch: refs/heads/master
Commit: 7c813bd3d51bfc94e7cf459f33ba8cb6a93116a8
Parents: 0d24370
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Jul 31 13:14:02 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jul 31 13:14:02 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/camel/component/smpp/SmppConsumer.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7c813bd3/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
index 5f6e516..3052b9d 100644
--- a/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
+++ b/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java
@@ -129,10 +129,11 @@ public class SmppConsumer extends DefaultConsumer {
             try {
                 Thread.sleep(1000);
                 session.unbindAndClose();
+                // clear session as we closed it successfully
+                session = null;
             } catch (Exception e) {
-                LOG.warn("Could not close session " + session);
+                LOG.warn("Cannot close session due " + e.getMessage());
             }
-            session = null;
         }
     }
 
@@ -147,6 +148,7 @@ public class SmppConsumer extends DefaultConsumer {
                         try {
                             Thread.sleep(initialReconnectDelay);
                         } catch (InterruptedException e) {
+                            // ignore
                         }
 
                         int attempt = 0;


Mime
View raw message