From 44c321453933308d4e14740705d6de6942af0f8a Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 26 Oct 2013 23:53:04 +0000 Subject: [PATCH] SMACK-460 ServiceDiscoveryManager constructor usage in connectionCreated() ServiceDiscoveryManager should not use the constructor in connectionCreated(), it may cause duplicate SDMs for the same connection and prevents the interaction with SDM before the connection is established. Instead getInstanceFor() is now used. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_2@13792 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smackx/ServiceDiscoveryManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java b/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java index 29090fb87..21047b2c0 100644 --- a/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java +++ b/source/org/jivesoftware/smackx/ServiceDiscoveryManager.java @@ -72,7 +72,7 @@ public class ServiceDiscoveryManager { static { Connection.addConnectionCreationListener(new ConnectionCreationListener() { public void connectionCreated(Connection connection) { - new ServiceDiscoveryManager(connection); + getInstanceFor(connection); } }); identities.add(new Identity(DEFAULT_IDENTITY_CATEGORY, DEFAULT_IDENTITY_NAME, DEFAULT_IDENTITY_TYPE));