Commit 048e0be
authored
tls: ensure TLS Sockets are closed if the underlying wrap closes
This fixes a potential segfault, among various other likely-related
issues, which all occur because TLSSockets were not informed if their
underlying stream was closed in many cases.
This also significantly modifies an existing TLS test. With this change
in place, that test no longer works, as it tries to mess with internals
to trigger a race, and those internals are now cleaned up earlier. This
test has been simplified to a more general TLS shutdown test.
PR-URL: #49327
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>1 parent 92fb7dd commit 048e0beCopy full SHA for 048e0be
File tree
Expand file treeCollapse file tree
3 files changed
+91
-43
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
3 files changed
+91
-43
lines changedOpen diff view settings
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
704 | 704 | |
705 | 705 | |
706 | 706 | |
| 707 | + |
| 708 | + |
| 709 | + |
707 | 710 | |
708 | 711 | |
709 | 712 | |
|
Collapse file
test/parallel/test-http2-socket-close.js
Copy file name to clipboard+67Lines changed: 67 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 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
Collapse file
test/parallel/test-tls-socket-close.js
Copy file name to clipboardExpand all lines: test/parallel/test-tls-socket-close.js+21-43Lines changed: 21 additions & 43 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | 11 | |
25 | 12 | |
26 | 13 | |
27 | | - |
28 | | - |
| 14 | + |
29 | 15 | |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
| 16 | + |
36 | 17 | |
37 | 18 | |
| 19 | + |
| 20 | + |
38 | 21 | |
39 | | - |
40 | 22 | |
41 | | - |
42 | 23 | |
43 | 24 | |
44 | 25 | |
45 | 26 | |
46 | 27 | |
47 | 28 | |
48 | 29 | |
| 30 | + |
49 | 31 | |
50 | | - |
| 32 | + |
51 | 33 | |
52 | 34 | |
53 | 35 | |
54 | 36 | |
55 | 37 | |
56 | | - |
| 38 | + |
57 | 39 | |
58 | 40 | |
59 | | - |
60 | | - |
| 41 | + |
| 42 | + |
61 | 43 | |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | | - |
71 | | - |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
72 | 56 | |
73 | 57 | |
74 | | - |
75 | | - |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
80 | 58 | |
0 commit comments