Skip to content

Commit e20e0cf

Browse files
Gargronabcang
authored andcommitted
Fix nil error when no DNS addresses are found for host (mastodon#9379)
1 parent 0e744b1 commit e20e0cf

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/lib/request.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ def open(host, *args)
162162
end
163163
end
164164

165-
raise outer_e if outer_e
165+
if outer_e
166+
raise outer_e
167+
else
168+
raise SocketError, "No address for #{host}"
169+
end
166170
end
167171

168172
alias new open

0 commit comments

Comments
 (0)