mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-03-12 00:45:16 +00:00
Update worker.rb
This commit is contained in:
parent
992ff329d5
commit
e7e6f7acc8
|
@ -154,13 +154,7 @@ def relay_connect(params, id = '')
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Timeout.timeout(STATEFUL_SOCKET_TIMEOUT) do
|
Timeout.timeout(STATEFUL_SOCKET_TIMEOUT) do
|
||||||
if ["https", "ssl", "tls"].include?(scheme)
|
conn = TCPSocket.open(client_address, client_port)
|
||||||
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
|
|
||||||
end
|
end
|
||||||
rescue Timeout::Error
|
rescue Timeout::Error
|
||||||
error = {
|
error = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user