Repository: youtube-dl
Issue: How to make youtube-dl wait for a disconnected network
Labels: question

- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones


## Question
Since I am located in a special environment in China, downloading videos often encounter broken links and need to be run again, and a playlist has 4000 videos, and it takes too much time to run again, so I need When disconnecting the network, youtube-dl will try to retry unlimited times. --retries and --socket-timeout have been tested and are invalid. The following log is a test of manual disconnection in the middle of the run that I ran

## Log
C:\Users\GFriend>set http_proxy=http://127.0.0.1:1081

C:\Users\GFriend>set https_proxy=http://127.0.0.1:1081

C:\Users\GFriend>youtube-dl --playlist-start 1 --no-check-certificate --socket-timeout 60 --retries 60 -f bestvideo"[width> 15360]"+bestaudio/bestvideo"[width> 10000]"+bestaudio/bestvideo"[width> 9900]"+bestaudio/bestvideo"[width> 9800]"+bestaudio/bestvideo"[width> 9700]"+bestaudio/bestvideo"[width> 9600]"+bestaudio/bestvideo"[width> 9500]"+bestaudio/bestvideo"[width> 9400]"+bestaudio/bestvideo"[width> 9200]"+bestaudio/bestvideo"[width> 9100]"+bestaudio/bestvideo"[width> 8900]"+bestaudio/bestvideo"[width> 8800]"+bestaudio/bestvideo"[width> 8700]"+bestaudio/bestvideo"[width> 8600]"+bestaudio/bestvideo"[width> 8500]"+bestaudio/bestvideo"[width> 8400]"+bestaudio/bestvideo"[width> 8300]"+bestaudio/bestvideo"[width> 8200]"+bestaudio/bestvideo"[width> 8100]"+bestaudio/bestvideo"[width> 8000]"+bestaudio/bestvideo"[width> 7900]"+bestaudio/bestvideo"[width> 7800]"+bestaudio/bestvideo"[width> 7700]"+bestaudio/bestvideo"[width> 7600]"+bestaudio/bestvideo"[width> 7500]"+bestaudio/bestvideo"[width> 7400]"+bestaudio/bestvideo"[width> 7300]"+bestaudio/bestvideo"[width> 7200]"+bestaudio/bestvideo"[width> 7100]"+bestaudio/bestvideo"[width> 7000]"+bestaudio/bestvideo"[width> 6900]"+bestaudio/bestvideo"[width> 6800]"+bestaudio/bestvideo"[width> 6700]"+bestaudio/bestvideo"[width> 6600]"+bestaudio/bestvideo"[width> 6500]"+bestaudio/bestvideo"[width> 6400]"+bestaudio/bestvideo"[width> 6300]"+bestaudio/bestvideo"[width> 6200]"+bestaudio/bestvideo"[width> 6100]"+bestaudio/bestvideo"[width> 6000]"+bestaudio/bestvideo"[width> 5900]"+bestaudio/bestvideo"[width> 5800]"+bestaudio/bestvideo"[width> 5700]"+bestaudio/bestvideo"[width> 5600]"+bestaudio/bestvideo"[width> 5500]"+bestaudio/bestvideo"[width> 5400]"+bestaudio/bestvideo"[width> 5300]"+bestaudio/bestvideo"[width> 5200]"+bestaudio/bestvideo"[width> 5100]"+bestaudio/bestvideo"[width> 5000]"+bestaudio/bestvideo"[width> 4900]"+bestaudio/bestvideo"[width> 4800]"+bestaudio/bestvideo"[width> 4700]"+bestaudio/bestvideo"[width> 4600]"+bestaudio/bestvideo"[width> 4500]"+bestaudio/bestvideo"[width> 4400]"+bestaudio/bestvideo"[width> 4300]"+bestaudio/bestvideo"[width> 4200]"+bestaudio/bestvideo"[width> 4100]"+bestaudio/bestvideo"[width> 4000]"+bestaudio/bestvideo"[width> 3900]"+bestaudio/bestvideo"[width> 3800]"+bestaudio/bestvideo"[width> 3700]"+bestaudio/bestvideo"[width> 3600]"+bestaudio/bestvideo"[width> 3500]"+bestaudio/bestvideo"[width> 3400]"+bestaudio/bestvideo"[width> 3300]"+bestaudio/bestvideo"[width> 3200]"+bestaudio/bestvideo"[width> 3100]"+bestaudio/bestvideo"[width> 3000]"+bestaudio/bestvideo"[width> 2900]"+bestaudio/bestvideo"[width> 2800]"+bestaudio/bestvideo"[width> 2700]"+bestaudio/bestvideo"[width> 2600]"+bestaudio/bestvideo"[width> 2500]"+bestaudio/bestvideo"[width> 2400]"+bestaudio/bestvideo"[width> 2300]"+bestaudio/bestvideo"[width> 2200]"+bestaudio/bestvideo"[width> 2100]"+bestaudio/bestvideo"[width> 2000]"+bestaudio/bestvideo"[width> 1900]"+bestaudio/bestvideo"[width> 1800]"+bestaudio/bestvideo"[width> 1800]"+bestaudio/bestvideo"[width> 1700]"+bestaudio/bestvideo"[width> 1600]"+bestaudio/bestvideo"[width> 1500]"+bestaudio/bestvideo"[width> 1400]"+bestaudio/bestvideo"[width> 1300]"+bestaudio/bestvideo"[width> 1200]"+bestaudio/bestvideo"[width> 1100]"+bestaudio/bestvideo"[width> 1000]"+bestaudio/bestvideo"[width> 900]"+bestaudio/bestvideo"[width> 800]"+bestaudio/bestvideo"[width> 700]"+bestaudio/bestvideo+bestaudio  https://www.youtube.com/playlist?list=PL2r8g8wf5WOzpsvqB_O8-2PQRTfKEGwve
[youtube:tab] PL2r8g8wf5WOzpsvqB_O8-2PQRTfKEGwve: Downloading webpage
[download] Downloading playlist: 170426 DingDong Live
[youtube:tab] playlist 170426 DingDong Live: Downloading 50 videos
[download] Downloading video 1 of 50
[youtube] GxF3OqtiGto: Downloading webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Resuming download at byte 92997375
[download] Destination: DingDong(딩동) Live 첫회! 우주소녀와 함께-GxF3OqtiGto.f247.webm
[download]  28.5% of 442.32MiB at  7.58MiB/s ETA 00:41         [download] Got server HTTP error: [WinError 10054] 远程主机强迫关闭了一个现有的连接。. Retrying (attempt 1 of 60)...
ERROR: unable to download video data: <urlopen error [WinError 10061] 由于目标计算机积极拒绝，无法连接。>