wait should be in a loop
Merge pull request #1304 from john-hill/PLFM-1655

wait should be in a loop