Commit 1afd207
tls: make StreamWrap work correctly in "drain" callback
When an instance of StreamWrap is shutting down and a "drain" event
is emitted, the instance will abort as its
`this[kCurrentShutdownRequest]` is already set. The following test
will fail before this commit.
PR-URL: #23294
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>1 parent 2564abf commit 1afd207Copy full SHA for 1afd207
File tree
Expand file treeCollapse file tree
2 files changed
+51
-4
lines changedOpen diff view settings
Filter options
- lib/internal
- test/parallel
Expand file treeCollapse file tree
2 files changed
+51
-4
lines changedOpen diff view settings
Collapse file
lib/internal/wrap_js_stream.js
Copy file name to clipboardExpand all lines: lib/internal/wrap_js_stream.js+3-4Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
100 | 100 | |
101 | 101 | |
102 | 102 | |
103 | | - |
104 | | - |
105 | | - |
106 | 103 | |
107 | 104 | |
108 | 105 | |
| ||
113 | 110 | |
114 | 111 | |
115 | 112 | |
116 | | - |
| 113 | + |
117 | 114 | |
| 115 | + |
| 116 | + |
118 | 117 | |
119 | 118 | |
120 | 119 | |
|
Collapse file
test/parallel/test-stream-wrap-drain.js
Copy file name to clipboard+48Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
0 commit comments