1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

SMACK-462 Use getInstace() ConnectionCreationListener

Prevent duplicate instances of a manager by using it's getInstance()
method instead of the manager's constructor.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_2@13800 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Florian Schmaus 2013-11-03 21:49:58 +00:00 committed by flow
parent 0e6817dc4f
commit 49573866ab
5 changed files with 10 additions and 8 deletions

View file

@ -59,7 +59,7 @@ public class KeepAliveManager {
if (SmackConfiguration.getKeepAliveInterval() > 0) {
Connection.addConnectionCreationListener(new ConnectionCreationListener() {
public void connectionCreated(Connection connection) {
new KeepAliveManager(connection);
getInstanceFor(connection);
}
});
}