Handles infinite loop condition.

If the loop goes into infinite status it will be terminated in the time specified