Starting with #430 we now short-circuit attempts to reconnect to peers when we fail to open a stream.
We still try to do this for dead peers that are still perceive as connected but this logically short-circuits when the stream establishment attempt fails.
This is an improvement over what we previously had, where we could get into "respawning writer" loops.
But it does have a drawback: it is possible to have multiple connections to a peer and pick the wrong connection to open a stream, leading to an otherwise healthy peer being ignored.
We need to introduce a principled mechanism for handling reconnect attempts; quite likely a backoff and possibly a blacklist will be enough.
Starting with #430 we now short-circuit attempts to reconnect to peers when we fail to open a stream. We still try to do this for dead peers that are still perceive as connected but this logically short-circuits when the stream establishment attempt fails.
This is an improvement over what we previously had, where we could get into "respawning writer" loops. But it does have a drawback: it is possible to have multiple connections to a peer and pick the wrong connection to open a stream, leading to an otherwise healthy peer being ignored.
We need to introduce a principled mechanism for handling reconnect attempts; quite likely a backoff and possibly a blacklist will be enough.