Skip to content

Commit

Permalink
Comment about http 'finish' and (unused) 'prefinish' events.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamn committed Jun 7, 2016
1 parent 1b9947e commit 560fe14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/webapp/webapp_server.js
Expand Up @@ -218,8 +218,10 @@ WebApp._timeoutAdjustmentRequestCallback = function (req, res) {
// Insert our new finish listener to run BEFORE the existing one which removes
// the response from the socket.
var finishListeners = res.listeners('finish');
// XXX Apparently in Node 0.12 this event is now called 'prefinish'.
// XXX Apparently in Node 0.12 this event was called 'prefinish'.
// https://github.com/joyent/node/commit/7c9b6070
// But it has switched back to 'finish' in Node v4:
// https://github.com/nodejs/node/pull/1411
res.removeAllListeners('finish');
res.on('finish', function () {
res.setTimeout(SHORT_SOCKET_TIMEOUT);
Expand Down

0 comments on commit 560fe14

Please sign in to comment.