catch state changing error when sending timeout to iq callbacks
This commit is contained in:
parent
7cf360fabf
commit
5cac4397dd
|
@ -1086,7 +1086,12 @@ public class XmppConnection implements Runnable {
|
|||
}
|
||||
}
|
||||
for(OnIqPacketReceived callback : callbacks) {
|
||||
try {
|
||||
callback.onIqPacketReceived(account, failurePacket);
|
||||
} catch (StateChangingError error) {
|
||||
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": caught StateChangingError("+error.state.toString()+") while clearing callbacks");
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": done clearing iq callbacks. " + this.packetCallbacks.size() + " left");
|
||||
}
|
||||
|
@ -1322,8 +1327,7 @@ public class XmppConnection implements Runnable {
|
|||
|
||||
public synchronized String sendUnmodifiedIqPacket(final IqPacket packet, final OnIqPacketReceived callback) {
|
||||
if (packet.getId() == null) {
|
||||
final String id = nextRandomId();
|
||||
packet.setAttribute("id", id);
|
||||
packet.setAttribute("id", nextRandomId());
|
||||
}
|
||||
if (callback != null) {
|
||||
synchronized (this.packetCallbacks) {
|
||||
|
|
Loading…
Reference in a new issue