SigHelper: Use 'URI.parse' instead of 'URI.new'
Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
This commit is contained in:
parent
10e5788c21
commit
61d75050e4
1 changed files with 2 additions and 2 deletions
|
@ -274,10 +274,10 @@ class Invidious::SigHelper
|
||||||
when .starts_with?('/')
|
when .starts_with?('/')
|
||||||
@socket = UNIXSocket.new(host_or_path)
|
@socket = UNIXSocket.new(host_or_path)
|
||||||
when .starts_with?("tcp://")
|
when .starts_with?("tcp://")
|
||||||
uri = URI.new(host_or_path)
|
uri = URI.parse(host_or_path)
|
||||||
@socket = TCPSocket.new(uri.host.not_nil!, uri.port.not_nil!)
|
@socket = TCPSocket.new(uri.host.not_nil!, uri.port.not_nil!)
|
||||||
else
|
else
|
||||||
uri = URI.new("tcp://#{host_or_path}")
|
uri = URI.parse("tcp://#{host_or_path}")
|
||||||
@socket = TCPSocket.new(uri.host.not_nil!, uri.port.not_nil!)
|
@socket = TCPSocket.new(uri.host.not_nil!, uri.port.not_nil!)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue