mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 03:27:59 +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
|
||||
public void run() {
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue