rust-lightning
rust-lightning copied to clipboard
Re-lookup DNS names in HttpClient after connect failure
@devrandom noted at https://github.com/rust-bitcoin/rust-lightning/pull/931#issuecomment-851624586 that we currently cache the dns resolution result in HttpClient and never re-look-up the name after repeated connection failure. We should cache the T: ToSocketAddrs type instead.
As a specific use case, assume you have a kubernetes cluster, and bitcoind is on one of the nodes. If the nodes goes down and the service is migrated to another node, the client will experience a disconnect, and the service DNS entry will be repointed at the new node.