-
-
Notifications
You must be signed in to change notification settings - Fork 32k
WIP net: enable emitclose in socket #36662
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,10 @@ server.listen(0, common.mustCall(() => { | |
|
||
req.on('response', common.mustCall(() => {})); | ||
req.once('data', common.mustCall(() => { | ||
// TODO: is this test needed? | ||
// It errors with ERR_HTTP2_NO_SOCKET_MANIPULATION because we are | ||
// calling destroy on the Proxy(ed) socket of the Http2ClientSession | ||
// which causes `emit` to becalled and the error to be thrown. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Calling destroy this way will cause |
||
net.Socket.prototype.destroy.call(client.socket); | ||
server.close(); | ||
})); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
'use strict'; | ||
|
||
const common = require('../common'); | ||
if (!common.hasCrypto) | ||
common.skip('missing crypto'); | ||
|
@@ -8,6 +9,10 @@ const tls = require('tls'); | |
const net = require('net'); | ||
const fixtures = require('../common/fixtures'); | ||
|
||
// TODO: is this test needed? | ||
// It fails with a timeout error because the `error` event is never emitted. | ||
// `write` doesn't error, is that a good thing? | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While trying different approaches in this PR I saw it is quite easy to cause SIGSEV errors in the tls module, so I might understand why this is here. |
||
// Regression test for https://github.com/nodejs/node/issues/8074 | ||
// | ||
// This test has a dependency on the order in which the TCP connection is made, | ||
|
Uh oh!
There was an error while loading. Please reload this page.