Commit 954217a
committed
stream: error Duplex write/read if not writable/readable
If writable/readable has been explicitly disabled then using
a Duplex as writable/readable should fail.
Fixes: #34374
PR-URL: #34385
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>1 parent 1544e69 commit 954217aCopy full SHA for 954217a
File tree
Expand file treeCollapse file tree
13 files changed
+97
-83
lines changedOpen diff view settings
Filter options
- lib
- internal
- bootstrap/switches
- http2
- streams
- src
- test
- parallel
- pseudo-tty
Expand file treeCollapse file tree
13 files changed
+97
-83
lines changedOpen diff view settings
Collapse file
lib/internal/bootstrap/switches/is_main_thread.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/switches/is_main_thread.js+1-5Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
148 | 148 | |
149 | 149 | |
150 | 150 | |
151 | | - |
152 | | - |
153 | | - |
154 | | - |
155 | | - |
| 151 | + |
156 | 152 | |
157 | 153 | |
158 | 154 | |
|
Collapse file
lib/internal/child_process.js
Copy file name to clipboardExpand all lines: lib/internal/child_process.js+1-3Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
324 | 324 | |
325 | 325 | |
326 | 326 | |
327 | | - |
| 327 | + |
328 | 328 | |
329 | 329 | |
330 | 330 | |
| ||
442 | 442 | |
443 | 443 | |
444 | 444 | |
445 | | - |
446 | | - |
447 | 445 | |
448 | 446 | |
449 | 447 | |
|
Collapse file
+10-4Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
358 | 358 | |
359 | 359 | |
360 | 360 | |
361 | | - |
362 | 361 | |
363 | 362 | |
364 | | - |
| 363 | + |
| 364 | + |
| 365 | + |
| 366 | + |
365 | 367 | |
366 | 368 | |
367 | 369 | |
368 | 370 | |
369 | 371 | |
370 | 372 | |
371 | 373 | |
372 | | - |
| 374 | + |
| 375 | + |
| 376 | + |
| 377 | + |
373 | 378 | |
374 | 379 | |
375 | 380 | |
| ||
2675 | 2680 | |
2676 | 2681 | |
2677 | 2682 | |
2678 | | - |
2679 | 2683 | |
2680 | 2684 | |
2681 | 2685 | |
| ||
2703 | 2707 | |
2704 | 2708 | |
2705 | 2709 | |
| 2710 | + |
| 2711 | + |
2706 | 2712 | |
2707 | 2713 | |
2708 | 2714 | |
|
Collapse file
lib/internal/streams/destroy.js
Copy file name to clipboardExpand all lines: lib/internal/streams/destroy.js+5-5Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
206 | 206 | |
207 | 207 | |
208 | 208 | |
209 | | - |
210 | | - |
| 209 | + |
| 210 | + |
211 | 211 | |
212 | 212 | |
213 | 213 | |
| ||
217 | 217 | |
218 | 218 | |
219 | 219 | |
220 | | - |
221 | | - |
222 | 220 | |
223 | 221 | |
224 | | - |
| 222 | + |
| 223 | + |
| 224 | + |
225 | 225 | |
226 | 226 | |
227 | 227 | |
|
Collapse file
lib/internal/streams/duplex.js
Copy file name to clipboardExpand all lines: lib/internal/streams/duplex.js+11-9Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | | - |
59 | 58 | |
60 | | - |
61 | | - |
62 | | - |
| 59 | + |
63 | 60 | |
64 | | - |
65 | | - |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
66 | 66 | |
67 | | - |
68 | | - |
69 | | - |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
70 | 72 | |
71 | 73 | |
72 | 74 | |
|
Collapse file
+5-6Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | | - |
| 54 | + |
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | 58 | |
59 | 59 | |
60 | 60 | |
61 | | - |
62 | | - |
63 | 61 | |
| 62 | + |
64 | 63 | |
65 | 64 | |
66 | 65 | |
| ||
89 | 88 | |
90 | 89 | |
91 | 90 | |
92 | | - |
| 91 | + |
93 | 92 | |
94 | 93 | |
95 | 94 | |
96 | 95 | |
97 | 96 | |
| 97 | + |
98 | 98 | |
99 | | - |
100 | | - |
| 99 | + |
101 | 100 | |
102 | 101 | |
103 | 102 | |
|
Collapse file
+3-4Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
121 | 121 | |
122 | 122 | |
123 | 123 | |
124 | | - |
| 124 | + |
125 | 125 | |
126 | | - |
| 126 | + |
127 | 127 | |
128 | 128 | |
129 | 129 | |
| ||
132 | 132 | |
133 | 133 | |
134 | 134 | |
135 | | - |
136 | 135 | |
137 | 136 | |
138 | 137 | |
139 | 138 | |
140 | 139 | |
141 | | - |
| 140 | + |
142 | 141 | |
143 | 142 | |
144 | 143 | |
|
Collapse file
-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
46 | 46 | |
47 | 47 | |
48 | 48 | |
49 | | - |
50 | 49 | |
51 | 50 | |
52 | 51 | |
|
Collapse file
test/parallel/test-http2-compat-socket-set.js
Copy file name to clipboardExpand all lines: test/parallel/test-http2-compat-socket-set.js+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | | - |
30 | | - |
31 | 29 | |
| 30 | + |
| 31 | + |
32 | 32 | |
33 | 33 | |
34 | 34 | |
|
Collapse file
test/parallel/test-stdio-readable-writable.js
Copy file name to clipboardExpand all lines: test/parallel/test-stdio-readable-writable.js-33Lines changed: 0 additions & 33 deletions
This file was deleted.
0 commit comments