Commit e5c290b
committed
fs: refactor close to use destroy
Refactor close() to use destroy() and not vice versa in ReadStream.
Avoid races between WriteStream.close and WriteStream.write, by aliasing
close to end().
Fixes: #2006
PR-URL: #15407
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent f27b5e4 commit e5c290bCopy full SHA for e5c290b
File tree
Expand file treeCollapse file tree
2 files changed
+47
-29
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+47
-29
lines changedOpen diff view settings
Collapse file
+34-26Lines changed: 34 additions & 26 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2090 | 2090 | |
2091 | 2091 | |
2092 | 2092 | |
2093 | | - |
2094 | 2093 | |
2095 | | - |
2096 | | - |
2097 | | - |
2098 | | - |
2099 | | - |
2100 | | - |
2101 | | - |
2102 | | - |
2103 | | - |
2104 | | - |
2105 | 2094 | |
2106 | 2095 | |
2107 | | - |
| 2096 | + |
2108 | 2097 | |
2109 | 2098 | |
2110 | | - |
| 2099 | + |
| 2100 | + |
| 2101 | + |
| 2102 | + |
| 2103 | + |
2111 | 2104 | |
2112 | 2105 | |
2113 | 2106 | |
2114 | 2107 | |
2115 | | - |
2116 | | - |
2117 | | - |
2118 | | - |
2119 | | - |
2120 | | - |
2121 | | - |
| 2108 | + |
2122 | 2109 | |
2123 | 2110 | |
2124 | 2111 | |
2125 | | - |
2126 | | - |
2127 | | - |
2128 | | - |
| 2112 | + |
| 2113 | + |
| 2114 | + |
| 2115 | + |
| 2116 | + |
| 2117 | + |
| 2118 | + |
2129 | 2119 | |
2130 | 2120 | |
| 2121 | + |
| 2122 | + |
| 2123 | + |
| 2124 | + |
2131 | 2125 | |
2132 | 2126 | |
2133 | 2127 | |
| ||
2179 | 2173 | |
2180 | 2174 | |
2181 | 2175 | |
2182 | | - |
| 2176 | + |
2183 | 2177 | |
2184 | 2178 | |
2185 | 2179 | |
| ||
2276 | 2270 | |
2277 | 2271 | |
2278 | 2272 | |
2279 | | - |
| 2273 | + |
| 2274 | + |
| 2275 | + |
| 2276 | + |
| 2277 | + |
| 2278 | + |
| 2279 | + |
| 2280 | + |
| 2281 | + |
| 2282 | + |
| 2283 | + |
| 2284 | + |
| 2285 | + |
| 2286 | + |
| 2287 | + |
2280 | 2288 | |
2281 | 2289 | |
2282 | 2290 | |
|
Collapse file
test/parallel/test-fs-read-stream-double-close.js
Copy file name to clipboardExpand all lines: test/parallel/test-fs-read-stream-double-close.js+13-3Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
| 7 | + |
7 | 8 | |
8 | | - |
9 | | - |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
0 commit comments