diff --git a/source/org/jivesoftware/smack/ReconnectionManager.java b/source/org/jivesoftware/smack/ReconnectionManager.java index c1689482e..ecac86391 100644 --- a/source/org/jivesoftware/smack/ReconnectionManager.java +++ b/source/org/jivesoftware/smack/ReconnectionManager.java @@ -22,7 +22,7 @@ public class ReconnectionManager implements ConnectionListener { private int secondBetweenReconnection = 5 * 60; // 5 minutes // Holds the thread that produces a periodical reconnection. - static private Thread reconnectionThread; + private Thread reconnectionThread; // Holds the connection to the server private XMPPConnection connection; @@ -81,17 +81,6 @@ public class ReconnectionManager implements ConnectionListener { this.secondBetweenReconnection = secondBetweenReconnection; } - /** - * Forces an immediate reconnection and attempts an immediate reconnection. - * - * Interrupts the existing reconnection thread so that it can try an immediate connection attempt. - */ - static public void forceReconnection() { - if (reconnectionThread != null) { - reconnectionThread.interrupt(); - } - } - /** * Starts a reconnection mechanism if it was configured to do that. * The algorithm is been executed when the first connection error is detected. @@ -157,12 +146,9 @@ public class ReconnectionManager implements ConnectionListener { .notifyAttemptToReconnectIn(remainingSeconds); } catch (InterruptedException e1) { - // We want to be able to legitimately interrupt this thread so we can - // force a reconnection. - remainingSeconds = 0; -// e1.printStackTrace(); + e1.printStackTrace(); // Notify the reconnection has failed -// ReconnectionManager.this.notifyReconnectionFailed(e1); + ReconnectionManager.this.notifyReconnectionFailed(e1); } } // Waiting time have finished