request disco items before disco#info on first connect
should make initial connect faster because code is not waiting for omemo code to run
This commit is contained in:
parent
e7094af9d5
commit
f81e5e471e
|
@ -1203,6 +1203,10 @@ public class XmppConnection implements Runnable {
|
|||
if (hash != null && ver != null) {
|
||||
discoveryResult = mXmppConnectionService.getCachedServiceDiscoveryResult(new Pair<>(hash, ver));
|
||||
}
|
||||
final boolean requestDiscoItemsFirst = !account.isOptionSet(Account.OPTION_LOGGED_IN_SUCCESSFULLY);
|
||||
if (requestDiscoItemsFirst) {
|
||||
sendServiceDiscoveryItems(account.getServer());
|
||||
}
|
||||
if (discoveryResult == null) {
|
||||
sendServiceDiscoveryInfo(account.getServer());
|
||||
} else {
|
||||
|
@ -1210,7 +1214,9 @@ public class XmppConnection implements Runnable {
|
|||
disco.put(account.getServer(), discoveryResult);
|
||||
}
|
||||
sendServiceDiscoveryInfo(account.getJid().toBareJid());
|
||||
sendServiceDiscoveryItems(account.getServer());
|
||||
if (!requestDiscoItemsFirst) {
|
||||
sendServiceDiscoveryItems(account.getServer());
|
||||
}
|
||||
|
||||
if (!mWaitForDisco.get()) {
|
||||
finalizeBind();
|
||||
|
|
Loading…
Reference in a new issue