1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

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

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