9a412d8be0 Connections to dnodes slow down (Adam Gibson)
Pull request description:
(edited from original comment since force-pushed a new set of code, though the intention is exactly the same)
Fixes https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1435.
Prior to this commit, if connections were immediately closed,
no backoff or jitter were applied to delay the next connection attempt,
resulting in too many connection attempts to directory nodes that the
client could not reach, and spam in the logs.
After this commit, we enforce that we always shut down the ClientService
on any disconnection trigger or connection failure, and only attempt to
reconnect with a manual backoff delay (4 seconds increasing by 50% for
20 attempts, plus a few seconds jitter), for directory nodes, while for
non-directory nodes we always give up on any failure.
Top commit has no ACKs.
Tree-SHA512: 26af339cd83fee2c3c94aef030e658d8cca58ca8bcfda5fa9a166f90d75b3c5c8bdd56c74d5c83222751f1a3561e3315e635a886bf534c9c49351b0712c12fad