aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-03-05 15:46:33 +0100
committeriNPUTmice <daniel@gultsch.de>2015-03-05 15:46:33 +0100
commitf25a82461007f43c23960720d6d94d2db5c8c7f7 (patch)
tree9bc5c446e2bac32859c6e90937656ab0c57ccc55 /src/main/java/eu/siacs/conversations/xmpp
parentc5230e081cd2c9a1c5b5bd0459e339668ff4cb6d (diff)
avoid unnecessary thread creation
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 44c367a6..57a64513 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -242,6 +242,13 @@ public class XmppConnection implements Runnable {
@Override
public void run() {
+ try {
+ if (socket != null) {
+ socket.close();
+ }
+ } catch (final IOException ignored) {
+
+ }
connect();
}