diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index 0e05a2775..4a93d1eb6 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -102,7 +102,7 @@ public class XmppConnection implements Runnable { private final WakeLock wakeLock; private Socket socket; private XmlReader tagReader; - private TagWriter tagWriter; + private TagWriter tagWriter = new TagWriter(); private final Features features = new Features(this); private boolean needsBinding = true; private boolean shouldAuthenticate = true; @@ -480,7 +480,9 @@ public class XmppConnection implements Runnable { } this.socket = socket; tagReader = new XmlReader(wakeLock); - if (tagWriter != null) tagWriter.forceClose(); + if (tagWriter != null) { + tagWriter.forceClose(); + } tagWriter = new TagWriter(); tagWriter.setOutputStream(socket.getOutputStream()); tagReader.setInputStream(socket.getInputStream()); |