better work around for not processing race condition stanza
This commit is contained in:
parent
7455e99761
commit
7fe8be1adc
|
@ -1232,6 +1232,12 @@ public class XmppConnection implements Runnable {
|
||||||
+ "'");
|
+ "'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (Thread.currentThread().isInterrupted()) {
|
||||||
|
Log.d(
|
||||||
|
Config.LOGTAG,
|
||||||
|
account.getJid().asBareJid() + "Not processing iq. Thread was interrupted");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (packet instanceof JinglePacket jinglePacket && isBound) {
|
if (packet instanceof JinglePacket jinglePacket && isBound) {
|
||||||
if (this.jingleListener != null) {
|
if (this.jingleListener != null) {
|
||||||
this.jingleListener.onJinglePacketReceived(account, jinglePacket);
|
this.jingleListener.onJinglePacketReceived(account, jinglePacket);
|
||||||
|
@ -1308,11 +1314,18 @@ public class XmppConnection implements Runnable {
|
||||||
+ "'");
|
+ "'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (Thread.currentThread().isInterrupted()) {
|
||||||
|
Log.d(
|
||||||
|
Config.LOGTAG,
|
||||||
|
account.getJid().asBareJid()
|
||||||
|
+ "Not processing message. Thread was interrupted");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.messageListener.onMessagePacketReceived(account, packet);
|
this.messageListener.onMessagePacketReceived(account, packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processPresence(final Tag currentTag) throws IOException {
|
private void processPresence(final Tag currentTag) throws IOException {
|
||||||
PresencePacket packet = (PresencePacket) processPacket(currentTag, PACKET_PRESENCE);
|
final PresencePacket packet = (PresencePacket) processPacket(currentTag, PACKET_PRESENCE);
|
||||||
if (!packet.valid()) {
|
if (!packet.valid()) {
|
||||||
Log.e(
|
Log.e(
|
||||||
Config.LOGTAG,
|
Config.LOGTAG,
|
||||||
|
@ -1323,6 +1336,13 @@ public class XmppConnection implements Runnable {
|
||||||
+ "'");
|
+ "'");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (Thread.currentThread().isInterrupted()) {
|
||||||
|
Log.d(
|
||||||
|
Config.LOGTAG,
|
||||||
|
account.getJid().asBareJid()
|
||||||
|
+ "Not processing presence. Thread was interrupted");
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.presenceListener.onPresencePacketReceived(account, packet);
|
this.presenceListener.onPresencePacketReceived(account, packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue