-
Notifications
You must be signed in to change notification settings - Fork 29.1k
-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
IncomingMessage will emit end
after aborted
#27981
Comments
It would be much easier if it didn't But I also can't not use I'm a little stuck at the moment... |
OSX, Node 10.13.0 const http = require('http')
http.createServer(function (req, res) {
res.write(Buffer.alloc(32))
setTimeout(() => (
res.destroy()
), 1000)
}).listen(0, function () {
http.request({
port: this.address().port,
method: 'GET',
path: '/'
}).on('response', res => res
.on('data', () => {})
.on('aborted', () => console.log('aborted'))
.on('end', () => console.log('end'))
.on('close', () => console.log('close'))
).end()
}) Will print aborted
end
close |
Issue title is misleading, |
end
after aborted
end
after aborted
Landed in 5f80df8 |
Whoops! Wrong window! But now that that landed, I think this can be closed? |
I encountered this while working on my nodejs based proxy server and retries of GET requests.
It turns out that when an upstream server dies the nodejs requests in the proxy will emit the following events:
The
end
event I find a little strange to receive after a connection has been forcefully aborted.Can someone confirm whether this is intentional or not?
The text was updated successfully, but these errors were encountered: