Commit 536d088
stream: use more accurate end-of-stream writable and readable detection
The value of stream.readable and stream.writable should not
be used to detect whether a stream is Writable or Readable.
Refs: #29395
PR-URL: #29409
Backport-PR-URL: #31345
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 4fd4a73 commit 536d088Copy full SHA for 536d088
File tree
Expand file treeCollapse file tree
2 files changed
+65
-2
lines changedOpen diff view settings
Filter options
- lib/internal/streams
- test/parallel
Expand file treeCollapse file tree
2 files changed
+65
-2
lines changedOpen diff view settings
Collapse file
lib/internal/streams/end-of-stream.js
Copy file name to clipboardExpand all lines: lib/internal/streams/end-of-stream.js+16-2Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
16 | 28 | |
17 | 29 | |
18 | 30 | |
| ||
28 | 40 | |
29 | 41 | |
30 | 42 | |
31 | | - |
32 | | - |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
33 | 47 | |
34 | 48 | |
35 | 49 | |
|
Collapse file
test/parallel/test-stream-finished.js
Copy file name to clipboardExpand all lines: test/parallel/test-stream-finished.js+49Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
184 | 184 | |
185 | 185 | |
186 | 186 | |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | + |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
0 commit comments