Skip to content

Commit a181061

Browse files
Gargronhiyuki2578
authored andcommitted
Fix nil error when no DNS addresses are found for host (mastodon#9379)
1 parent 852af24 commit a181061

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
@@ -163,7 +163,11 @@ def open(host, *args)
163163
end
164164
end
165165

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

169173
alias new open

0 commit comments

Comments
 (0)