Skip to content

Commit

Permalink
Fix nil error when no DNS addresses are found for host (mastodon#9379)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and abcang committed Mar 19, 2020
1 parent 0e744b1 commit e20e0cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/lib/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ def open(host, *args)
end
end

raise outer_e if outer_e
if outer_e
raise outer_e
else
raise SocketError, "No address for #{host}"
end
end

alias new open
Expand Down

0 comments on commit e20e0cf

Please sign in to comment.