Woudn't it be more efficient to put the try bloc within the while to avoid having to restart the thread?