diff --git a/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt b/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt index 4ecd25e6cdf..1fe6ededa7a 100644 --- a/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt +++ b/app/src/main/kotlin/app/aaps/receivers/KeepAliveWorker.kt @@ -94,7 +94,7 @@ class KeepAliveWorker( } override suspend fun doWorkAndLog(): Result { - aapsLogger.debug(LTag.CORE, "KeepAlive received from: " + inputData.getString("schedule")) + aapsLogger.debug(LTag.CORE, "KeepAlive received from: " + inputData.getString("schedule") + " Thread count: " + Thread.activeCount()) // 15 min interval is WorkManager minimum so schedule another instances to have 5 min interval if (inputData.getString("schedule") == KA_0) { diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt index 230d5bcbae7..bd61b7c7379 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt @@ -106,7 +106,8 @@ class NsIncomingDataProcessor @Inject constructor( if (sgv.timestamp < dateUtil.now() + T.mins(1).msecs() && sgv.timestamp > latestDateInReceivedData) { latestDateInReceivedData = sgv.timestamp glucoseValues += sgv - } + } else + aapsLogger.debug(LTag.NSCLIENT, "Ignoring record with wrong timestamp: $sgv") } } else if (sgvs is List<*>) { // V3 client @@ -115,7 +116,8 @@ class NsIncomingDataProcessor @Inject constructor( if (sgv.timestamp < dateUtil.now() && sgv.timestamp > latestDateInReceivedData) { latestDateInReceivedData = sgv.timestamp glucoseValues += sgv - } + } else + aapsLogger.debug(LTag.NSCLIENT, "Ignoring record with wrong timestamp: $sgv") } } if (glucoseValues.isNotEmpty()) {