protect against potential retry infinite loop
Merge pull request #2 from th7/no_retry_loops

protect against potential retry infinite loop