This fixes #64 for me. See a detailed description of the problem in that issue.
I have not spent more time on this than finding that this seems to work for me in the sense that I don't get an ever increasing amount of connections. I don't know how to write a test for it or if it affects something else, so it should be reviewed with some scrutiny.
thanks for the contribution, however this is not the right place to close the stream.
I took the time to write some tests and the problem bubbled up, so this should be fixed in #98.
Closing.
Hello!
This fixes #64 for me. See a detailed description of the problem in that issue.
I have not spent more time on this than finding that this seems to work for me in the sense that I don't get an ever increasing amount of connections. I don't know how to write a test for it or if it affects something else, so it should be reviewed with some scrutiny.