mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
Close http clients after using
The crystal http client maintains a keepalive connection to the other server which stays alive for some time. This should be closed if the client instance is not used again to avoid hogging resources
This commit is contained in:
parent
eeeecf9763
commit
e0d25ff887
6 changed files with 30 additions and 11 deletions
|
@ -91,6 +91,8 @@ class Invidious::Jobs::BypassCaptchaJob < Invidious::Jobs::BaseJob
|
|||
},
|
||||
}.to_json).body)
|
||||
|
||||
captcha_client.close
|
||||
|
||||
raise response["error"].as_s if response["error"]?
|
||||
task_id = response["taskId"].as_i
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue