mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +01:00
Remove connection field from BOSHConnectionListener
This commit is contained in:
parent
f4aaf387d4
commit
d295939285
1 changed files with 5 additions and 11 deletions
|
@ -161,7 +161,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
}
|
||||
client = BOSHClient.create(cfgBuilder.build());
|
||||
|
||||
client.addBOSHClientConnListener(new BOSHConnectionListener(this));
|
||||
client.addBOSHClientConnListener(new BOSHConnectionListener());
|
||||
client.addBOSHClientResponseListener(new BOSHPacketReader());
|
||||
|
||||
// Initialize the debugger
|
||||
|
@ -459,12 +459,6 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
*/
|
||||
private class BOSHConnectionListener implements BOSHClientConnListener {
|
||||
|
||||
private final XMPPBOSHConnection connection;
|
||||
|
||||
public BOSHConnectionListener(XMPPBOSHConnection connection) {
|
||||
this.connection = connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the BOSHConnection about connection state changes.
|
||||
* Process the connection listeners and try to login if the
|
||||
|
@ -477,13 +471,13 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
if (isFirstInitialization) {
|
||||
isFirstInitialization = false;
|
||||
for (ConnectionCreationListener listener : getConnectionCreationListeners()) {
|
||||
listener.connectionCreated(connection);
|
||||
listener.connectionCreated(XMPPBOSHConnection.this);
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
if (wasAuthenticated) {
|
||||
connection.login();
|
||||
login();
|
||||
}
|
||||
for (ConnectionListener listener : getConnectionListeners()) {
|
||||
listener.reconnectionSuccessful();
|
||||
|
@ -513,8 +507,8 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
|
|||
}
|
||||
}
|
||||
finally {
|
||||
synchronized (connection) {
|
||||
connection.notifyAll();
|
||||
synchronized (XMPPBOSHConnection.this) {
|
||||
XMPPBOSHConnection.this.notifyAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue