Commit bf1ed7e
tls: forward keepAlive, keepAliveInitialDelay, noDelay to socket
`tls.connect()` silently ignores `keepAlive`, `keepAliveInitialDelay`,
and `noDelay` options. The documentation states it accepts any
`socket.connect()` option, and `net.createConnection()` with the same
options works correctly.
Forward the options through both code paths so `net.Socket`'s
constructor stores them on the internal symbols (`kSetNoDelay`,
`kSetKeepAlive`, `kSetKeepAliveInitialDelay`), which `afterConnect()`
then applies to the handle.
Fixes: #62003
PR-URL: #62004
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>1 parent e55edde commit bf1ed7eCopy full SHA for bf1ed7e
4 files changed
+77-3Lines changed: 77 additions & 3 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- lib
- internal
- tls
- test/parallel
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
100 | 100 | |
101 | 101 | |
102 | 102 | |
| 103 | + |
| 104 | + |
| 105 | + |
103 | 106 | |
104 | 107 | |
105 | 108 | |
|
Collapse file
+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
590 | 590 | |
591 | 591 | |
592 | 592 | |
| 593 | + |
| 594 | + |
| 595 | + |
593 | 596 | |
594 | 597 | |
595 | 598 | |
| ||
1755 | 1758 | |
1756 | 1759 | |
1757 | 1760 | |
| 1761 | + |
| 1762 | + |
| 1763 | + |
1758 | 1764 | |
1759 | 1765 | |
1760 | 1766 | |
|
Collapse file
+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
48 | 48 | |
49 | 49 | |
50 | 50 | |
| 51 | + |
| 52 | + |
| 53 | + |
51 | 54 | |
52 | 55 | |
53 | 56 | |
| ||
356 | 359 | |
357 | 360 | |
358 | 361 | |
359 | | - |
360 | | - |
361 | | - |
362 | 362 | |
363 | 363 | |
364 | 364 | |
|
Collapse file
test/parallel/test-tls-connect-keepalive-nodelay.js
Copy file name to clipboard+65Lines changed: 65 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 | + |
0 commit comments