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 — http: don't emit 'finish' after 'error' · nodejs/node@cf47bb9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _http_outgoing.js
  • test/parallel
    • test-tls-set-secure-context.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_http_outgoing.js‎

Copy file name to clipboardExpand all lines: lib/_http_outgoing.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ OutgoingMessage.prototype.addTrailers = function addTrailers(headers) {
727727
};
728728

729729
function onFinish(outmsg) {
730+
if (outmsg && outmsg.socket && outmsg.socket._hadError) return;
730731
outmsg.emit('finish');
731732
}
732733

Collapse file

‎test/parallel/test-tls-set-secure-context.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-set-secure-context.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ function makeRequest(port, id) {
8282
headers: { id }
8383
};
8484

85+
let errored = false;
8586
https.get(`https://localhost:${port}`, options, (res) => {
8687
let response = '';
8788

@@ -95,7 +96,10 @@ function makeRequest(port, id) {
9596
resolve(response);
9697
}));
9798
}).on('error', (err) => {
99+
errored = true;
98100
reject(err);
101+
}).on('finish', () => {
102+
assert.strictEqual(errored, false);
99103
});
100104
});
101105
}

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.