curl: (56) Recv failure: Connection was reset, How to retry this?

Viewed 322

So I'm using curl to download a file. I'm calling it through ssh to a windows machine.

#Python code SSH to windows machine and run curl
cmd = 'curl --retry 5 --retry-delay 5 -o filetoDownload.msi %s' % (download_url)
ssh.exec_command(cmd)

Sometimes rarely I get this error curl: (56) Recv failure: Connection was reset

How do I retry this? Or is there a better approach to this?

0 Answers
Related