mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Fix isSmResumptionPossible() returning wrong values
The cases where reversed. Change the condition for better readability. Also fix int and long handling in the computation of maxResumptionMillies. Fixes SMACK-654.
This commit is contained in:
parent
3b6891b0d0
commit
dabbb40de6
1 changed files with 4 additions and 2 deletions
|
@ -1693,8 +1693,10 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
|
||||
// See if resumption time is over
|
||||
long current = System.currentTimeMillis();
|
||||
long maxResumptionMillies = getMaxSmResumptionTime() * 1000;
|
||||
if (shutdownTimestamp + maxResumptionMillies > current) {
|
||||
long maxResumptionMillies = ((long) getMaxSmResumptionTime()) * 1000;
|
||||
if (current > shutdownTimestamp + maxResumptionMillies) {
|
||||
// Stream resumption is *not* possible if the current timestamp is greater then the greatest timestamp where
|
||||
// resumption is possible
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue