Are Libp2p stream only usable once?

These streams can take a little getting used to, I had a similar issue a when I first started using them. The stream closes when the iterable runs out of items, you probably want to turn it async. I made a bunch of notes to reference when answering my post: Understanding streaming iterables and application protocols - #2 by saul.

I also found myself using the same patterns on the streams so I created a module for it:

The source code may also help you.