Don't emit connection lost events before the connection is built up
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@589 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
483382946b
commit
5b53a640ee
1 changed files with 4 additions and 3 deletions
|
@ -646,6 +646,8 @@ public class ConnectionControl implements IConnectionControl {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error == null) {
|
if (error == null) {
|
||||||
|
connection.addConnectionListener(new DisconnectListener());
|
||||||
|
|
||||||
requestGames();
|
requestGames();
|
||||||
emitLater(connectedEvent);
|
emitLater(connectedEvent);
|
||||||
} else {
|
} else {
|
||||||
|
@ -659,7 +661,6 @@ public class ConnectionControl implements IConnectionControl {
|
||||||
private LoginError doConnect() {
|
private LoginError doConnect() {
|
||||||
try {
|
try {
|
||||||
connection.connect();
|
connection.connect();
|
||||||
connection.addConnectionListener(new DisconnectListener());
|
|
||||||
return null;
|
return null;
|
||||||
} catch (XMPPException e) {
|
} catch (XMPPException e) {
|
||||||
XMPPError xmppError = e.getXMPPError();
|
XMPPError xmppError = e.getXMPPError();
|
||||||
|
|
Reference in a new issue