From e53542b63abba1d672c7678e8016e0abdce6d171 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Tue, 11 Sep 2018 21:16:09 +0200 Subject: removed synchronized in favor of another interrupted check in startXmpp() --- src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index f33817f09..1def41694 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -466,7 +466,7 @@ public class XmppConnection implements Runnable { * * @return true if server returns with valid xmpp, false otherwise */ - private synchronized boolean startXmpp(Socket socket) throws Exception { + private boolean startXmpp(Socket socket) throws Exception { if (Thread.currentThread().isInterrupted()) { throw new InterruptedException(); } @@ -481,6 +481,9 @@ public class XmppConnection implements Runnable { tagWriter.beginDocument(); sendStartStream(); final Tag tag = tagReader.readTag(); + if (Thread.currentThread().isInterrupted()) { + throw new InterruptedException(); + } return tag != null && tag.isStart("stream"); } -- cgit v1.2.3