]> cat aescling's git repositories - mastodon.git/commit
request: in the event of failure, try other IPs (#6761) (#6813)
authorRey Tucker <git@reytucker.us>
Tue, 20 Mar 2018 08:06:08 +0000 (04:06 -0400)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 20 Mar 2018 08:06:08 +0000 (09:06 +0100)
commit36b57037961383466b7f5c20b39ee68cd9f202a0
tree3b5f496101f3fdb59f19a2a764e99a826a9d96ef
parentff6b8a6443c2c97d185927053bdc8816e0e03434
request: in the event of failure, try other IPs (#6761) (#6813)

* request: in the event of failure, try other IPs (#6761)

In the case where a name has multiple A/AAAA records, we should
try subsequent records instead of immediately failing when we have a
failure on the first IP address.

This significantly improves delivery success when there are network
connectivity problems affecting only IPv4 or IPv6.

* fix method call style

* request_spec: adjust test case to use Addrinfo

* request: Request/open: move private addr check to within begin/rescue

* request_spec: add case to test failover, fix exception check

* Double Addrinfo.foreach so that it correctly yields instances
app/lib/request.rb
spec/lib/request_spec.rb