mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-20 18:08:54 +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:
@@ -427,7 +427,7 @@ def generate_captcha(key, db)
|
||||
end
|
||||
|
||||
def generate_text_captcha(key, db)
|
||||
response = make_client(TEXTCAPTCHA_URL).get("/omarroth@protonmail.com.json").body
|
||||
response = make_client(TEXTCAPTCHA_URL, &.get("/omarroth@protonmail.com.json").body)
|
||||
response = JSON.parse(response)
|
||||
|
||||
tokens = response["a"].as_a.map do |answer|
|
||||
|
||||
Reference in New Issue
Block a user