Synchronize modification of list in OmnipodPumpPlugin
This commit is contained in:
parent
025f25fb27
commit
b474e72a53
1 changed files with 41 additions and 37 deletions
|
@ -462,6 +462,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
|||
if (firstRun) {
|
||||
initializeAfterRileyLinkConnection();
|
||||
} else if (!statusRequestList.isEmpty()) {
|
||||
synchronized (statusRequestList) {
|
||||
Iterator<OmnipodStatusRequestType> iterator = statusRequestList.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
|
@ -501,6 +502,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
|||
}
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
} else if (this.hasTimeDateOrTimeZoneChanged) {
|
||||
PumpEnactResult result = executeCommand(OmnipodCommandType.SET_TIME, aapsOmnipodManager::setTime);
|
||||
|
||||
|
@ -830,8 +832,10 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
|
|||
}
|
||||
|
||||
public void addPodStatusRequest(OmnipodStatusRequestType pumpStatusRequest) {
|
||||
synchronized (statusRequestList) {
|
||||
statusRequestList.add(pumpStatusRequest);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFakingTempsByExtendedBoluses() {
|
||||
|
|
Loading…
Reference in a new issue