From 402b4302917e56017c51637eb505c674dd8496c2 Mon Sep 17 00:00:00 2001 From: rcollier Date: Thu, 23 Jun 2011 19:55:10 +0000 Subject: [PATCH] SMACK-230 Added synchronization since disconnect can be called from multiple threads. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_2_0@12540 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index d04585081..9a65a8313 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -419,7 +419,7 @@ public class XMPPConnection extends Connection { saslAuthentication.init(); } - public void disconnect(Presence unavailablePresence) { + public synchronized void disconnect(Presence unavailablePresence) { // If not connected, ignore this request. if (packetReader == null || packetWriter == null) { return;