Skip to content
This repository was archived by the owner on Dec 7, 2019. It is now read-only.

add documentation what Close and Reset are supposed to do #13

Closed
marten-seemann opened this issue Jul 19, 2017 · 2 comments · Fixed by #18
Closed

add documentation what Close and Reset are supposed to do #13

marten-seemann opened this issue Jul 19, 2017 · 2 comments · Fixed by #18

Comments

@marten-seemann
Copy link
Contributor

Reset was recently (be2992b) added to the Stream interface, but it's not clear what the expected behavior is.

We should describe that in the interface. Furthermore, Close is also an ambiguous term, and needs an explanation as well.

For example in QUIC, Close closes the stream in the write-direction, and Reset closes the stream in read-direction.

@Stebalien
Copy link
Member

For example in QUIC, Close closes the stream in the write-direction, and Reset closes the stream in read-direction.

This. @whyrusleeping added this method because yamux has this same behavior and it turns out we've been half-closing our streams. This often didn't make a difference but was the ultimate cause of a rather nasty bitswap bug (ipfs/kubo#3651 (comment)).

@marten-seemann
Copy link
Contributor Author

marten-seemann commented Jul 19, 2017

That's great news! Having matching interfaces here will reduce a lot of friction with the QUIC integration I've been working on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants