GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — net: fix family autoselection SSL connection handling · nodejs/node@5ddca72

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _tls_wrap.js
  • test
    • internet
      • test-https-autoselectfamily-slow-timeout.js
    • parallel
      • test-http-remove-connection-header-persists-connection.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ TLSSocket.prototype._wrapHandle = function(wrap, handle) {
634634
};
635635

636636
TLSSocket.prototype[kReinitializeHandle] = function reinitializeHandle(handle) {
637-
const originalServername = this._handle.getServername();
638-
const originalSession = this._handle.getSession();
637+
const originalServername = this.ssl ? this._handle.getServername() : null;
638+
const originalSession = this.ssl ? this._handle.getSession() : null;
639639

640640
this.handle = this._wrapHandle(null, handle);
641641
this.ssl = this._handle;
Collapse file

‎test/internet/test-https-autoselectfamily-slow-timeout.js‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
const { addresses } = require('../common/internet');
5+
6+
if (!common.hasCrypto)
7+
common.skip('missing crypto');
8+
9+
const assert = require('assert');
10+
const { request } = require('https');
11+
12+
request(
13+
`https://${addresses.INET_HOST}/en`,
14+
// Purposely set this to false because we want all connection but the last to fail
15+
{ autoSelectFamily: true, autoSelectFamilyAttemptTimeout: 10 },
16+
(res) => {
17+
assert.strictEqual(res.statusCode, 200);
18+
res.resume();
19+
},
20+
).end();
Collapse file

‎test/parallel/test-http-remove-connection-header-persists-connection.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-remove-connection-header-persists-connection.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
require('../common');
2+
const common = require('../common');
33
const assert = require('assert');
44

55
const net = require('net');
@@ -52,7 +52,7 @@ function makeHttp10Request(cb) {
5252

5353
setTimeout(function() {
5454
cb(socket);
55-
}, 10);
55+
}, common.platformTimeout(50));
5656
});
5757
}
5858

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.