| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -736,6 +736,7 @@ OutgoingMessage.prototype.addTrailers = function addTrailers(headers) { | |||
| 736 | 736 | }; | |
| 737 | 737 | ||
| 738 | 738 | function onFinish(outmsg) { | |
| 739 | + if (outmsg && outmsg.socket && outmsg.socket._hadError) return; | ||
| 739 | 740 | outmsg.emit('finish'); | |
| 740 | 741 | } | |
| 741 | 742 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,6 +82,7 @@ function makeRequest(port, id) { | |||
| 82 | 82 | headers: { id } | |
| 83 | 83 | }; | |
| 84 | 84 | ||
| 85 | + let errored = false; | ||
| 85 | 86 | https.get(`https://localhost:${port}`, options, (res) => { | |
| 86 | 87 | let response = ''; | |
| 87 | 88 | ||
@@ -95,7 +96,10 @@ function makeRequest(port, id) { | |||
| 95 | 96 | resolve(response); | |
| 96 | 97 | })); | |
| 97 | 98 | }).on('error', (err) => { | |
| 99 | + errored = true; | ||
| 98 | 100 | reject(err); | |
| 101 | + }).on('finish', () => { | ||
| 102 | + assert.strictEqual(errored, false); | ||
| 99 | 103 | }); | |
| 100 | 104 | }); | |
| 101 | 105 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments