Another thing to talk about here with setInterval is setting a loop counter and clearing the interval when that loop count is hit.
var counter = 0
intervalId = 0;
function myLoopFunction()
{
intervalId = setInterval(function() {
//make this is the first thing you do in the set interval function
counter++;
//do you code for setInterval() and clearInterval under normal conditions here...
//okay, if we have tried for 5 minutes (30 x 10 seconds ), then lets stop trying because we did not reach the clearInterval under number means
//make this the last check in your set interval function
if ( counter > 30 ) {
clearInterval(polliFrameSourceIntervalId);
}
//end setInterval
} , 10000);