| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b320387 commit 825a683
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -839,7 +839,7 @@ function resOnFinish(req, res, socket, state, server) { | |||
| 839 | 839 | } | |
| 840 | 840 | ||
| 841 | 841 | function emitCloseNT(self) { | |
| 842 | - if (!self.destroyed) { | ||
| 842 | + if (!self._closed) { | ||
| 843 | 843 | self.destroyed = true; | |
| 844 | 844 | self._closed = true; | |
| 845 | 845 | self.emit('close'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,3 +78,25 @@ const assert = require('assert'); | |||
| 78 | 78 | }) | |
| 79 | 79 | ); | |
| 80 | 80 | } | |
| 81 | + | ||
| 82 | + { | ||
| 83 | + const server = http.createServer( | ||
| 84 | + common.mustCall((req, res) => { | ||
| 85 | + res.on('close', common.mustCall()); | ||
| 86 | + res.destroy(); | ||
| 87 | + }) | ||
| 88 | + ); | ||
| 89 | + | ||
| 90 | + server.listen( | ||
| 91 | + 0, | ||
| 92 | + common.mustCall(() => { | ||
| 93 | + http.get( | ||
| 94 | + { port: server.address().port }, | ||
| 95 | + common.mustNotCall() | ||
| 96 | + ) | ||
| 97 | + .on('error', common.mustCall(() => { | ||
| 98 | + server.close(); | ||
| 99 | + })); | ||
| 100 | + }) | ||
| 101 | + ); | ||
| 102 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments