-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: ignore spurious 'EMFILE' #12698
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// Before https://github.com/nodejs/node/pull/2847 a child process trying | ||
// (asynchronously) to use the closed channel to it's creator caused a segfault. | ||
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.
|
||
'use strict'; | ||
|
||
const common = require('../common'); | ||
|
@@ -33,11 +35,14 @@ const server = net.createServer(function(s) { | |
worker.send({}, s, callback); | ||
}); | ||
|
||
// Errors can happen if this connection | ||
// is still happening while the server has been closed. | ||
// https://github.com/nodejs/node/issues/3635#issuecomment-157714683 | ||
// ECONNREFUSED or ECONNRESET errors can happen if this connection is still | ||
// establishing while the server has already closed. | ||
// EMFILE can happen if the worker __and__ the server had already closed. | ||
s.on('error', function(err) { | ||
if ((err.code !== 'ECONNRESET') && | ||
((err.code !== 'ECONNREFUSED'))) { | ||
(err.code !== 'ECONNREFUSED') && | ||
(err.code !== 'EMFILE')) { | ||
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. @refack could you put a brief two line explanation of why this error occurs in a comment above? When reading through tests mysteriously ignored errors are always a bit of code smell. 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. ack. |
||
throw err; | ||
} | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, should be an issue, so:
https://github.com/nodejs/node/pull/2847
->https://github.com/nodejs/node/issues/2847
Also can you order this as in the guide? Should look like: