Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OutgoingMessage doesn't always emit 'close' #20600

Closed
ronag opened this issue May 8, 2018 · 0 comments
Closed

OutgoingMessage doesn't always emit 'close' #20600

ronag opened this issue May 8, 2018 · 0 comments

Comments

@ronag
Copy link
Member

ronag commented May 8, 2018

OutgoingMessage doesn't always emit 'close' after emitting 'finish'.

'use strict';

const common = require('../common');
const http = require('http');

const server = http.Server(common.mustCall((req, res) => {
  res.end();
  res.on('finish', common.mustCall());
  res.on('close', common.mustCall());
  req.on('close', common.mustCall());
  res.socket.on('close', () => server.close());
}));

server.listen(0, common.mustCall(() => {
  http.get({ port: server.address().port }, common.mustCall());
}));
addaleax pushed a commit that referenced this issue May 14, 2018
PR-URL: #20611
Fixes: #20600
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
watson added a commit to watson/end-of-stream that referenced this issue May 24, 2018
This broke in Node.js 10.2.0 because of:
nodejs/node#20611

Node core issue:
nodejs/node#20600

Node core fix:
nodejs/node#20611
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant