google / glazier

A tool for automating the installation of the Microsoft Windows operating system on various device platforms.
Apache License 2.0
1.22k stars 90 forks source link

Implement read/connect timeout for file downloads #724

Closed iamacarpet closed 4 months ago

iamacarpet commented 7 months ago

As discussed in #723 , implement a global timeout for blocking operations in the urllib connection used for downloading files.

After having done further research, this does affect socket read operations once the connection is open, not just the initial connection establishment - I wanted to double check this, as I'd initially seen some conflicting information.

60 seconds feels like a safe timeout, although I'm open to making this higher if you feel necessary.