From dd0be7c52236385ba9af37d8a69787e5034b3094 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 28 Jun 2019 11:05:08 -0500 Subject: [PATCH] Revert "Push potential fix for #578" This reverts commit ebfd7d21535cfcf30daf578e86028d49087af517. --- src/invidious/helpers/handlers.cr | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/invidious/helpers/handlers.cr b/src/invidious/helpers/handlers.cr index 4494b854..216f9b5d 100644 --- a/src/invidious/helpers/handlers.cr +++ b/src/invidious/helpers/handlers.cr @@ -224,28 +224,4 @@ class HTTP::Client response end - - # See https://github.com/crystal-lang/crystal/issues/7843 - private def socket - socket = @socket - return socket if socket - - hostname = @host.starts_with?('[') && @host.ends_with?(']') ? @host[1..-2] : @host - socket = TCPSocket.new hostname, @port, @dns_timeout, @connect_timeout - socket.read_timeout = @read_timeout if @read_timeout - socket.sync = false - - {% if !flag?(:without_openssl) %} - if tls = @tls - _socket = socket - begin - socket = OpenSSL::SSL::Socket::Client.new(socket, context: tls, sync_close: true, hostname: @host) - rescue - _socket.close - end - end - {% end %} - - @socket = socket - end end