aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/smpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/smpp')
-rw-r--r--src/org/traccar/smpp/SmppClient.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/org/traccar/smpp/SmppClient.java b/src/org/traccar/smpp/SmppClient.java
index 006f86e53..317d6debf 100644
--- a/src/org/traccar/smpp/SmppClient.java
+++ b/src/org/traccar/smpp/SmppClient.java
@@ -157,9 +157,11 @@ public class SmppClient {
}
public void scheduleReconnect() {
- reconnectionTask = reconnectionExecutor.scheduleWithFixedDelay(
- new ReconnectionTask(this),
- reconnectionDelay, reconnectionDelay, TimeUnit.MILLISECONDS);
+ if (reconnectionTask == null || reconnectionTask.isDone()) {
+ reconnectionTask = reconnectionExecutor.scheduleWithFixedDelay(
+ new ReconnectionTask(this),
+ reconnectionDelay, reconnectionDelay, TimeUnit.MILLISECONDS);
+ }
}
private void stopReconnectionkTask() {