~singpolyma/cheogram-android

6d6bbc0a5d1a6591cc93db75edf85e232cece3c6 — Daniel Gultsch 5 years ago c05accc
removed synchronized in favor of another interrupted check in startXmpp()
1 files changed, 6 insertions(+), 1 deletions(-)

M src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
M src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java => src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +6 -1
@@ 176,6 176,8 @@ public class XmppConnection implements Runnable {
	private volatile Thread mThread;
	private CountDownLatch mStreamCountDownLatch;



	public XmppConnection(final Account account, final XmppConnectionService service) {
		this.account = account;
		this.mXmppConnectionService = service;


@@ 437,7 439,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();
		}


@@ 452,6 454,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");
	}