Commit b1ada0a
authored
tls: handle cases where the raw socket is destroyed
Ensure that the `'close'` event is emitted on a `TLSSocket` when it is
created from an existing raw `net.Socket` and the raw socket is not
closed cleanly (destroyed).
Refs: 048e0bec5147
Refs: #49902 (comment)
Fixes: #49902
PR-URL: #49980
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>1 parent e01c1d7 commit b1ada0aCopy full SHA for b1ada0a
File tree
Expand file treeCollapse file tree
2 files changed
+38
-14
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+38
-14
lines changedOpen diff view settings
Collapse file
+13-3Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
657 | 657 | |
658 | 658 | |
659 | 659 | |
660 | | - |
661 | | - |
662 | | - |
| 660 | + |
| 661 | + |
| 662 | + |
| 663 | + |
| 664 | + |
| 665 | + |
| 666 | + |
| 667 | + |
| 668 | + |
| 669 | + |
| 670 | + |
| 671 | + |
663 | 672 | |
| 673 | + |
664 | 674 | |
665 | 675 | |
666 | 676 | |
|
Collapse file
test/parallel/test-tls-socket-close.js
Copy file name to clipboardExpand all lines: test/parallel/test-tls-socket-close.js+25-11Lines changed: 25 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
6 | 6 | |
7 | 7 | |
8 | 8 | |
| 9 | + |
9 | 10 | |
10 | 11 | |
11 | 12 | |
| ||
14 | 15 | |
15 | 16 | |
16 | 17 | |
| 18 | + |
17 | 19 | |
18 | 20 | |
19 | 21 | |
20 | | - |
| 22 | + |
21 | 23 | |
| 24 | + |
22 | 25 | |
23 | | - |
24 | | - |
25 | 26 | |
26 | | - |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
27 | 33 | |
28 | 34 | |
29 | 35 | |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
30 | 40 | |
31 | 41 | |
32 | 42 | |
| ||
41 | 51 | |
42 | 52 | |
43 | 53 | |
| 54 | + |
44 | 55 | |
45 | 56 | |
46 | | - |
47 | | - |
| 57 | + |
| 58 | + |
| 59 | + |
48 | 60 | |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
| 61 | + |
54 | 62 | |
55 | 63 | |
56 | 64 | |
57 | 65 | |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
58 | 72 | |
0 commit comments