I'm having some problem with IE ajax requests. The ajax requests are stopping after like 5 minutes. I've set the callback on both success and error to restart the function calling the script, it goes well for a few minutes, then suddenly crashes.
I's going like:
function startBOT()
{
currentPlayer += 1;
checkPlayerNumber();
var time = new Date();
var minute = time.getMinutes();
if(minute % 4 != 0)
var runPile = "no";
setTimeout(function()
{
//startSearch
jQuery.ajax({ url: 'search_action.php?player='+currentPlayer,cache:false, async:true, timeout: 20000, dataType: "text", type: "GET", processData: false,
success:function(searchData)
{
var searchResponse = searchData.split("|");
changeAction(searchResponse[2]);
//getLog
jQuery.ajax({ url: 'log.php?act=getLast',cache:false, async:true, dataType: "text", type: "GET", processData: false,
success:function(logData)
{
var logResponse = logData.split("|");
if(String(logResponse[1]) == 'nothing')
{
logData = false;
}
else
{
jQuery("#addLogHere").prepend(logResponse[1]);
}
startBOT();
},error:function(jqXHR, textStatus, errorThrown){ alert(jqXHR.statusText);startBOT(); }, fail:function(jqXHR, textStatus, errorThrown){startBOT();}});
}, sleepTime);
}
the alert function doesnt work too, so it means the .error() wasnt triggered.