mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:11:08 +08:00
FIX: correctly use timeouts in FileHelper
and FinalDestination
(#12921)
Previous refactors have lost usage of read_timeout in `FileHelper.download` and `FinalDestination` was incorrectly using `Net::HTTP.start` by setting `open_timeout` in the block instead of directly during the invocation. Couldn't figure how to write a good test for this without slowing the spec.
This commit is contained in:
@ -49,7 +49,8 @@ class FileHelper
|
||||
max_redirects: follow_redirect ? 5 : 0,
|
||||
skip_rate_limit: skip_rate_limit,
|
||||
verbose: verbose,
|
||||
validate_uri: validate_uri
|
||||
validate_uri: validate_uri,
|
||||
timeout: read_timeout
|
||||
)
|
||||
|
||||
fd.get do |response, chunk, uri|
|
||||
|
Reference in New Issue
Block a user