Commit 1baee18
tls: keep track of stream that is closed
TLSWrap object keeps a pointer reference to the underlying
TCPWrap object. This TCPWrap object could be closed and deleted
by the event-loop which leaves us with a dangling pointer.
So the TLSWrap object needs to track the "close" event on the
TCPWrap object.
PR-URL: #11776
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>1 parent 2c2a664 commit 1baee18Copy full SHA for 1baee18
File tree
Expand file treeCollapse file tree
4 files changed
+60
-1
lines changedOpen diff view settings
Filter options
- lib
- src
- test/parallel
Expand file treeCollapse file tree
4 files changed
+60
-1
lines changedOpen diff view settings
Collapse file
+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
378 | 378 | |
379 | 379 | |
380 | 380 | |
| 381 | + |
| 382 | + |
| 383 | + |
| 384 | + |
| 385 | + |
| 386 | + |
381 | 387 | |
382 | 388 | |
383 | 389 | |
|
Collapse file
+10-1Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
522 | 522 | |
523 | 523 | |
524 | 524 | |
525 | | - |
| 525 | + |
526 | 526 | |
527 | 527 | |
528 | 528 | |
| ||
782 | 782 | |
783 | 783 | |
784 | 784 | |
| 785 | + |
| 786 | + |
| 787 | + |
| 788 | + |
| 789 | + |
| 790 | + |
| 791 | + |
| 792 | + |
785 | 793 | |
786 | 794 | |
787 | 795 | |
| ||
912 | 920 | |
913 | 921 | |
914 | 922 | |
| 923 | + |
915 | 924 | |
916 | 925 | |
917 | 926 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
137 | 137 | |
138 | 138 | |
139 | 139 | |
| 140 | + |
140 | 141 | |
141 | 142 | |
142 | 143 | |
|
Collapse file
test/parallel/test-tls-socket-close.js
Copy file name to clipboard+43Lines changed: 43 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 | + |
0 commit comments