Merge pull request #1087 from 0x330a/fix/expire-old-call-messages

Prevent very old messages (15 minutes ago) being processed to prevent endless crashes in some cases
This commit is contained in:
Morgan Pretty
2023-01-24 13:59:19 +11:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

@@ -56,6 +56,10 @@ object SnodeAPI {
* user's clock is incorrect.
*/
internal var clockOffset = 0L
val nowWithOffset
get() = System.currentTimeMillis() + clockOffset
internal var forkInfo by observable(database.getForkInfo()) { _, oldValue, newValue ->
if (newValue > oldValue) {
Log.d("Loki", "Setting new fork info new: $newValue, old: $oldValue")