Skip to content

Commit 80d2477

Browse files
committed
Fix PTU retry handling
1 parent cacef97 commit 80d2477

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/controller/SettingsController.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,14 @@ SDL.SettingsController = Em.Object.create(
345345
* @param {Boolean} abort
346346
*/
347347
policyUpdateRetry: function(abort) {
348+
if(SDL.SDLModel.data.policyUpdateRetry.isIterationInProgress) {
349+
return;
350+
}
348351
clearTimeout(SDL.SDLModel.data.policyUpdateRetry.timer);
349352
SDL.SDLModel.data.policyUpdateRetry.timer = null;
350353

351354
var sendOnSystemRequest = function() {
355+
SDL.SDLModel.data.policyUpdateRetry.isIterationInProgress = false;
352356
FFW.BasicCommunication.OnSystemRequest(
353357
'PROPRIETARY',
354358
SDL.SettingsController.policyUpdateFile,
@@ -358,6 +362,7 @@ SDL.SettingsController = Em.Object.create(
358362
}
359363
if(!SDL.SDLModel.data.policyUpdateRetry.isRetry) {
360364
SDL.SDLModel.data.policyUpdateRetry.isRetry = true;
365+
SDL.SDLModel.data.policyUpdateRetry.isIterationInProgress = true;
361366
SDL.SDLModel.data.policyUpdateRetry.timer = setTimeout(
362367
function() {
363368
sendOnSystemRequest();
@@ -379,6 +384,7 @@ SDL.SettingsController = Em.Object.create(
379384
sendOnSystemRequest();
380385
}, SDL.SDLModel.data.policyUpdateRetry.oldTimer
381386
);
387+
SDL.SDLModel.data.policyUpdateRetry.isIterationInProgress = true;
382388
SDL.SDLModel.data.policyUpdateRetry.try++;
383389
} else {
384390
SDL.SDLModel.data.policyUpdateRetry.isRetry = false;

app/model/sdl/Abstract/data.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ SDL.SDLModelData = Em.Object.create(
7474
try: null,
7575
timer: null,
7676
oldTimer: 0,
77-
isRetry: false
77+
isRetry: false,
78+
isIterationInProgress: false
7879
},
7980
/**
8081
* Application's container for current processed requests on VR component

0 commit comments

Comments
 (0)