holepunchto / hyperswarm-secret-stream

Secret stream backed by Noise and libsodium's secretstream
Apache License 2.0
35 stars 14 forks source link

keepAlive() on only one side causes error #18

Closed gmaclennan closed 1 year ago

gmaclennan commented 1 year ago

This may be just a docs issue: If you set keepAlive() on one side of the stream, but not the other, then things will break because the empty buffers get passed through to the stream consumer. When using this with Hypercore this causes an error in protomux because it tries to process the empty buffer from secret-stream.

Maybe the docs for this method should state "Keep alive must be set on both sides of the stream, because otherwise things will break"?

mafintosh commented 1 year ago

Feel free to document that