| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3d05d82 commit 8799f43
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1015,7 +1015,8 @@ interface. This is an [`EventEmitter`][] with the following events: | |||
| 1015 | 1015 | added: v0.6.7 | |
| 1016 | 1016 | --> | |
| 1017 | 1017 | ||
| 1018 | - Indicates that the underlying connection was terminated. | ||
| 1018 | + Indicates that the underlying connection was terminated before | ||
| 1019 | + [`response.end()`][] was called or able to flush. | ||
| 1019 | 1020 | ||
| 1020 | 1021 | ### Event: 'finish' | |
| 1021 | 1022 | <!-- YAML | |
@@ -1505,6 +1506,7 @@ added: v0.4.2 | |||
| 1505 | 1506 | --> | |
| 1506 | 1507 | ||
| 1507 | 1508 | Indicates that the underlying connection was closed. | |
| 1509 | + Just like `'end'`, this event occurs only once per response. | ||
| 1508 | 1510 | ||
| 1509 | 1511 | ### message.aborted | |
| 1510 | 1512 | <!-- YAML | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -561,8 +561,6 @@ function resOnFinish(req, res, socket, state, server) { | |||
| 561 | 561 | req._dump(); | |
| 562 | 562 | ||
| 563 | 563 | res.detachSocket(socket); | |
| 564 | - req.emit('close'); | ||
| 565 | - process.nextTick(emitCloseNT, res); | ||
| 566 | 564 | ||
| 567 | 565 | if (res._last) { | |
| 568 | 566 | if (typeof socket.destroySoon === 'function') { | |
@@ -585,10 +583,6 @@ function resOnFinish(req, res, socket, state, server) { | |||
| 585 | 583 | } | |
| 586 | 584 | } | |
| 587 | 585 | ||
| 588 | - function emitCloseNT(self) { | ||
| 589 | - self.emit('close'); | ||
| 590 | - } | ||
| 591 | - | ||
| 592 | 586 | // The following callback is issued after the headers have been read on a | |
| 593 | 587 | // new message. In this callback we setup the response object and pass it | |
| 594 | 588 | // to the user. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments