mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-24 09:42:17 -05:00
fixed possible logout bugs
This commit is contained in:
parent
3737a96dbb
commit
3d88ffc5cd
@ -1508,6 +1508,9 @@ public class XmppConnectionService extends Service {
|
||||
thread.start();
|
||||
scheduleWakeupCall((int) (Config.CONNECT_TIMEOUT * 1.2),
|
||||
false);
|
||||
} else {
|
||||
account.getRoster().clearPresences();
|
||||
account.setXmppConnection(null);
|
||||
}
|
||||
}
|
||||
}).start();
|
||||
|
@ -910,8 +910,7 @@ public class XmppConnection implements Runnable {
|
||||
}
|
||||
|
||||
public void disconnect(boolean force) {
|
||||
changeStatus(Account.STATUS_OFFLINE);
|
||||
Log.d(Config.LOGTAG, "disconnecting");
|
||||
Log.d(Config.LOGTAG, account.getJid()+": disconnecting");
|
||||
try {
|
||||
if (force) {
|
||||
socket.close();
|
||||
@ -929,6 +928,7 @@ public class XmppConnection implements Runnable {
|
||||
Thread.sleep(100);
|
||||
}
|
||||
tagWriter.writeTag(Tag.end("stream:stream"));
|
||||
socket.close();
|
||||
} catch (IOException e) {
|
||||
Log.d(Config.LOGTAG,
|
||||
"io exception during disconnect");
|
||||
|
Loading…
Reference in New Issue
Block a user