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:
Matthias Schiffer 2011-06-22 09:04:55 +02:00
parent 483382946b
commit 5b53a640ee

View file

@ -646,6 +646,8 @@ public class ConnectionControl implements IConnectionControl {
}
if (error == null) {
connection.addConnectionListener(new DisconnectListener());
requestGames();
emitLater(connectedEvent);
} else {
@ -659,7 +661,6 @@ public class ConnectionControl implements IConnectionControl {
private LoginError doConnect() {
try {
connection.connect();
connection.addConnectionListener(new DisconnectListener());
return null;
} catch (XMPPException e) {
XMPPError xmppError = e.getXMPPError();