mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 20:52:21 -05:00
explictitly handle iq timeouts in bind and session iqs
This commit is contained in:
parent
c4a548ada0
commit
cd451856b2
@ -704,8 +704,11 @@ public class XmppConnection implements Runnable {
|
|||||||
this.sendUnmodifiedIqPacket(iq, new OnIqPacketReceived() {
|
this.sendUnmodifiedIqPacket(iq, new OnIqPacketReceived() {
|
||||||
@Override
|
@Override
|
||||||
public void onIqPacketReceived(final Account account, final IqPacket packet) {
|
public void onIqPacketReceived(final Account account, final IqPacket packet) {
|
||||||
|
if (packet.getType() == IqPacket.TYPE.TIMEOUT) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final Element bind = packet.findChild("bind");
|
final Element bind = packet.findChild("bind");
|
||||||
if (bind != null) {
|
if (bind != null && packet.getType() == IqPacket.TYPE.RESULT) {
|
||||||
final Element jid = bind.findChild("jid");
|
final Element jid = bind.findChild("jid");
|
||||||
if (jid != null && jid.getContent() != null) {
|
if (jid != null && jid.getContent() != null) {
|
||||||
try {
|
try {
|
||||||
@ -757,7 +760,9 @@ public class XmppConnection implements Runnable {
|
|||||||
this.sendUnmodifiedIqPacket(startSession, new OnIqPacketReceived() {
|
this.sendUnmodifiedIqPacket(startSession, new OnIqPacketReceived() {
|
||||||
@Override
|
@Override
|
||||||
public void onIqPacketReceived(Account account, IqPacket packet) {
|
public void onIqPacketReceived(Account account, IqPacket packet) {
|
||||||
if (packet.getType() == IqPacket.TYPE.RESULT) {
|
if (packet.getType() == IqPacket.TYPE.TIMEOUT) {
|
||||||
|
return;
|
||||||
|
} else if (packet.getType() == IqPacket.TYPE.RESULT) {
|
||||||
sendPostBindInitialization();
|
sendPostBindInitialization();
|
||||||
} else {
|
} else {
|
||||||
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not init sessions");
|
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not init sessions");
|
||||||
|
Loading…
Reference in New Issue
Block a user