synchronized getAutosensData

This commit is contained in:
Milos Kozak 2017-08-08 15:55:31 +02:00
parent 2f8ca8bb04
commit bbc68b2266

View file

@ -522,6 +522,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
@Nullable
public static AutosensData getAutosensData(long time) {
synchronized (dataLock) {
long now = System.currentTimeMillis();
if (time > now)
return null;
@ -538,6 +539,7 @@ public class IobCobCalculatorPlugin implements PluginBase {
return null;
}
}
}
@Nullable
public static AutosensData getLastAutosensData() {