| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -634,8 +634,8 @@ TLSSocket.prototype._wrapHandle = function(wrap, handle) { | |||
| 634 | 634 | }; | |
| 635 | 635 | ||
| 636 | 636 | 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; | ||
| 639 | 639 | ||
| 640 | 640 | this.handle = this._wrapHandle(null, handle); | |
| 641 | 641 | this.ssl = this._handle; | |
| Original file line number | Diff line number | Diff 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(); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments