From 780872f2ef72f034050ffc54bfab81555d90b815 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 25 Jan 2015 16:25:22 +0100 Subject: [PATCH] =?UTF-8?q?Remove=20superflous=20throwAlreadyConnected?= =?UTF-8?q?=E2=80=A6Exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in XMPPTCPConnection. connectInternal() is only called by AbstractXMPPConnection.connect() which does already invoke this method. --- .../java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index f123500a0..df83f80a3 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -793,9 +793,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { */ @Override protected void connectInternal() throws SmackException, IOException, XMPPException { - throwAlreadyConnectedExceptionIfAppropriate(); - // Establishes the connection, readers and writers + // Establishes the TCP connection to the server and does setup the reader and writer. Throws an exception if + // there is an error establishing the connection connectUsingConfiguration(); + + // We connected successfully to the servers TCP port socketClosed = false; initConnection();