Retry Get pulse log command in case of failure
This commit is contained in:
parent
6d377d7b6a
commit
10ab880e28
|
@ -90,13 +90,19 @@ public class OmnipodUITask {
|
|||
break;
|
||||
|
||||
case GetPodPulseLog:
|
||||
try {
|
||||
returnDataObject = communicationManager.readPulseLog();
|
||||
} catch(Exception ex) {
|
||||
if(isLogEnabled()) {
|
||||
LOG.warn("Failed to retrieve pulse log", ex);
|
||||
// This command is very error prone, so retry a few times if it fails
|
||||
// Can take some time, but that's ok since this is a very specific feature for experts
|
||||
// And will not be used by normal users
|
||||
for(int i = 0; 3 > i; i++) {
|
||||
try {
|
||||
returnDataObject = communicationManager.readPulseLog();
|
||||
break;
|
||||
} catch (Exception ex) {
|
||||
if (isLogEnabled()) {
|
||||
LOG.warn("Failed to retrieve pulse log", ex);
|
||||
}
|
||||
returnDataObject = null;
|
||||
}
|
||||
returnDataObject = null;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue