From 8cad76b2cfb59739b9037ead55e2343973300115 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sun, 23 May 2021 06:13:23 -0700 Subject: [PATCH] Redirect quic proxy @family to internal conn --- src/invidious/helpers/utils.cr | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/invidious/helpers/utils.cr b/src/invidious/helpers/utils.cr index 95f2a740..22069858 100644 --- a/src/invidious/helpers/utils.cr +++ b/src/invidious/helpers/utils.cr @@ -62,9 +62,11 @@ end class QuicProxyWrapper property yt_headers : Hash(String, String) - def initialize(url : URI, family : Socket::Family = Socket::Family::UNSPEC) + property family : Socket::Family + + def initialize(url : URI) @conn = HTTP::Client.new(url) - @family = family + @family = Socket::Family::INET header_retreival = HackyHeaderRetrevialClass.new add_yt_headers(header_retreival) @@ -78,11 +80,12 @@ class QuicProxyWrapper end - def family=(value)0 + def family=(value) + @conn.family = value end def family - return @family + return @conn.family end def close