Closed vyzo closed 5 years ago
~Reusing the existing goroutine will linger too, and will make decrementing the stream count awkward. Plus the new goroutine has a very short stack, which is not necessarily the case when reusing the goroutine.~
But I do like the idea of the atomic counter, it's more code but totally obviates the need for the extra goroutine.
Alright, implemented with an atomic counter.
This adds connection manager tagging for peers with live hops. Note the extra supervisory goroutine in the hop, as we need to ensure both sides are closed before removing the tag and reduce the live hop count.
Closes #65