Skip to content

Commit a2209dc

Browse files
pmoerenhoutdavsclaus
authored andcommitted
Update jSMPP version, remove workaround, the reconnection and close deadlock are fixed.
1 parent 1192073 commit a2209dc

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppConsumer.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,9 @@ protected void doStop() throws Exception {
127127
private void closeSession() {
128128
if (session != null) {
129129
session.removeSessionStateListener(this.internalSessionStateListener);
130-
// remove this hack after http://code.google.com/p/jsmpp/issues/detail?id=93 is fixed
131-
try {
132-
Thread.sleep(1000);
133-
session.unbindAndClose();
134-
// clear session as we closed it successfully
135-
session = null;
136-
} catch (Exception e) {
137-
LOG.warn("Cannot close session due " + e.getMessage());
138-
}
130+
session.unbindAndClose();
131+
// clear session as we closed it successfully
132+
session = null;
139133
}
140134
}
141135

components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppProducer.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,8 @@ protected void doStop() throws Exception {
166166
private void closeSession() {
167167
if (session != null) {
168168
session.removeSessionStateListener(this.internalSessionStateListener);
169-
// remove this hack after http://code.google.com/p/jsmpp/issues/detail?id=93 is fixed
170-
try {
171-
Thread.sleep(1000);
172-
session.unbindAndClose();
173-
} catch (Exception e) {
174-
LOG.warn("Could not close session " + session);
175-
}
169+
session.unbindAndClose();
170+
// clear session as we closed it successfully
176171
session = null;
177172
}
178173
}

parent/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
<!-- Upgrade to 1.7.26 causes stability issues. See CAMEL-10477 -->
352352
<jruby-version>1.7.18</jruby-version>
353353
<jsendnsca-version>1.3.1</jsendnsca-version>
354-
<jsmpp-version>2.3.2</jsmpp-version>
354+
<jsmpp-version>2.3.3</jsmpp-version>
355355
<jsch-version>0.1.54</jsch-version>
356356
<jsch-bundle-version>0.1.54_1</jsch-bundle-version>
357357
<jsendnsca-bundle-version>1.3.1_3</jsendnsca-bundle-version>

0 commit comments

Comments
 (0)