Check & clear server queue & return if we have this

If we have the exact same item URL, there is a save jamming situation,
so clear the server message and item from the queue then return
This commit is contained in:
Matt Pass
2016-04-02 12:55:19 +01:00
parent cca5836698
commit 904dee8f80
2 changed files with 46 additions and 38 deletions

View File

@@ -2551,6 +2551,14 @@ var ICEcoder = {
serverQueue: function(action,item,file,changes) {
var cM, nextSaveID, txtArea, topSaveID, element, xhr, statusObj, timeStart;
// If we have this exact item URL, it's almost certain we've got a repetitive save
// situation and so clear the message and server queue item to avoid save jamming
if (ICEcoder.serverQueueItems.indexOf(item) !== -1) {
top.ICEcoder.serverMessage();
top.ICEcoder.serverQueue("del",0);
return;
}
cM = ICEcoder.getcMInstance();
// Firstly, work out how many saves we have to carry out
nextSaveID=0;