mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-03-11 16:35:14 +00:00
Update worker.rb
This commit is contained in:
parent
992ff329d5
commit
e7e6f7acc8
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user