mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +01:00
Fix wrong boolean condition in async API
inverse boolean condition, correct is: "if packetListener has been removed, then we received no response" and add check for exceptionCallback being null.
This commit is contained in:
parent
76f8895ae3
commit
28629e0e7f
1 changed files with 3 additions and 1 deletions
|
@ -1108,7 +1108,9 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
boolean removed = removePacketListener(packetListener);
|
boolean removed = removePacketListener(packetListener);
|
||||||
if (!removed) {
|
// If the packetListener got removed, then it was never run and
|
||||||
|
// we never received a response, inform the exception callback
|
||||||
|
if (removed && exceptionCallback != null) {
|
||||||
exceptionCallback.processException(new NoResponseException());
|
exceptionCallback.processException(new NoResponseException());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue