add retry logic to copy from

the decrement has to be called always and while looping the closed value could have changed, so I would rather keep it in the loop