mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-17 02:18:51 +00:00
Fix monkeypatch for HTTP::Client
This commit is contained in:
@@ -226,15 +226,15 @@ end
|
||||
|
||||
class HTTP::Client
|
||||
private def handle_response(response)
|
||||
if @socket.is_a?(OpenSSL::SSL::Socket::Client)
|
||||
if @socket.is_a?(OpenSSL::SSL::Socket::Client) && @host.ends_with? "googlevideo.com"
|
||||
close unless response.keep_alive? || @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
|
||||
|
||||
if @socket.as(OpenSSL::SSL::Socket::Client).@in_buffer_rem.empty?
|
||||
@socket = nil
|
||||
end
|
||||
else
|
||||
close unless response.keep_alive?
|
||||
end
|
||||
|
||||
response
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user