Skip to content

Commit 8784c5a

Browse files
doc: note quic reset and unidirectional edge cases
The reference added earlier in this pull request described only the bidirectional happy path. Three behaviours were missing: * `resetStream()` discards any data still queued for sending. A reset stream is never acknowledged, so that queue can no longer drain. * `resetStream()` is a no-op once the stream has already been reset. * Neither method sends a frame on the unidirectional stream that lacks the side it aborts — `stopSending()` on a locally-initiated one, `resetStream()` on a remote-initiated one. Both fail silently there. The wording for stream directionality follows `stream.destroy()`, which already states that the readable side exists on bidirectional and remote-initiated unidirectional streams. Refs: nodejs#63680 Signed-off-by: Ji Hoon Kang <[email protected]>
1 parent 226668f commit 8784c5a

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎doc/api/quic.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,8 +1964,12 @@ Tells the peer that this end will not send any more data on this stream,
19641964
sending a `RESET_STREAM` frame carrying `code`. The readable side is left
19651965
open, so data already sent by the peer remains available to read.
19661966

1967-
No acknowledgement of this action is provided. Has no effect if the stream
1968-
has been destroyed.
1967+
Any data still queued for sending is discarded. A reset stream is never
1968+
acknowledged by the peer, so the outbound queue can no longer drain.
1969+
1970+
No acknowledgement of this action is provided. The call does nothing if the
1971+
stream has been destroyed, if it has already been reset, or if it is a
1972+
remote-initiated unidirectional stream, which has no writable side to abort.
19691973

19701974
### `stream.stopSending([code])`
19711975

@@ -1980,8 +1984,9 @@ Asks the peer to stop sending data on this stream, sending a `STOP_SENDING`
19801984
frame carrying `code`. The writable side is left open, so this end can
19811985
still send data.
19821986

1983-
No acknowledgement of this action is provided. Has no effect if the stream
1984-
has been destroyed.
1987+
No acknowledgement of this action is provided. The call does nothing if the
1988+
stream has been destroyed, or if it is a locally-initiated unidirectional
1989+
stream, which has no readable side to abort.
19851990

19861991
### `stream.early`
19871992

0 commit comments

Comments
 (0)