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
This commit is contained in:
Florian Schmaus 2013-10-26 23:53:04 +00:00 committed by flow
parent 1ea6159ce4
commit 44c3214539
1 changed files with 1 additions and 1 deletions

View File

@ -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));