| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -647,6 +647,8 @@ function finishMaybe(stream, state) { | |||
| 647 | 647 | if (need) { | |
| 648 | 648 | prefinish(stream, state); | |
| 649 | 649 | if (state.pendingcb === 0) { | |
| 650 | + if (state.errorEmitted) | ||
| 651 | + return; | ||
| 650 | 652 | state.finished = true; | |
| 651 | 653 | stream.emit('finish'); | |
| 652 | 654 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -132,6 +132,7 @@ const stream = require('stream'); | |||
| 132 | 132 | process.nextTick(cb); | |
| 133 | 133 | }; | |
| 134 | 134 | w.on('error', common.mustCall()); | |
| 135 | + w.on('finish', common.mustNotCall()); | ||
| 135 | 136 | w.on('prefinish', () => { | |
| 136 | 137 | w.write("shouldn't write in prefinish listener"); | |
| 137 | 138 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments