libp2p / libp2p/specs

Decide how to handle stream Close then Reset

Open
#166 13 comments 0 reactions 3 assignees View on GitHub

@vasco-santos is already working on this.

Since May 6, 2019.

Dominant language
No language data
Stars
1.8k
Forks
320
Avg merge
11d 15h
Merged PRs (30d)
1

Description

If a user calls Close() (close-write) and then Reset(), what should we do?

  1. Ignore the reset. We probably shouldn't do this as we want to be able to tell the remote side to stop writing to us.
  2. Send the reset but only apply it to the read side of the stream? This is probably the nicest thing to do.
  3. If the stream is fully closed, do nothing. Otherwise, reset the entire stream (discarding any queued reads on the remote side).

Currently, we don't appear to do any of these consistently in go. IIRC, JS doesn't even expose Reset().

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.