mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-17 18:38:50 +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:
@@ -269,6 +269,8 @@ def fetch_reddit_comments(id, sort_by = "confidence")
|
||||
raise InfoException.new("Could not fetch comments")
|
||||
end
|
||||
|
||||
client.close
|
||||
|
||||
comments = result[1].data.as(RedditListing).children
|
||||
return comments, thread
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user