Update worker.rb

This commit is contained in:
Namhyeon Go 2024-03-07 16:50:35 +09:00 committed by GitHub
parent 992ff329d5
commit e7e6f7acc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,13 +154,7 @@ def relay_connect(params, id = '')
begin
Timeout.timeout(STATEFUL_SOCKET_TIMEOUT) do
if ["https", "ssl", "tls"].include?(scheme)
ssl_context = OpenSSL::SSL::SSLContext.new
conn = OpenSSL::SSL::SSLSocket.new(TCPSocket.open(client_address, client_port), ssl_context)
conn.connect
else
conn = TCPSocket.open(client_address, client_port)
end
conn = TCPSocket.open(client_address, client_port)
end
rescue Timeout::Error
error = {