Skip to content

Commit

Permalink
SigHelper: Use 'URI.parse' instead of 'URI.new'
Browse files Browse the repository at this point in the history
Co-authored-by: Brahim Hadriche <[email protected]>
  • Loading branch information
SamantazFox and iBicha committed Jul 4, 2024
1 parent 0fc4034 commit 9713a54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invidious/helpers/sig_helper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,10 @@ class Invidious::SigHelper
when .starts_with?('/')
@socket = UNIXSocket.new(host_or_path)
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!)
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!)
end

Expand Down

0 comments on commit 9713a54

Please sign in to comment.