File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ // Before https://github.com/nodejs/node/pull/2847 a child process trying
2+ // (asynchronously) to use the closed channel to it's creator caused a segfault.
13'use strict' ;
24
35const common = require ( '../common' ) ;
@@ -33,11 +35,14 @@ const server = net.createServer(function(s) {
3335 worker . send ( { } , s , callback ) ;
3436 } ) ;
3537
36- // Errors can happen if this connection
37- // is still happening while the server has been closed.
38+ // https://github.com/nodejs/node/issues/3635#issuecomment-157714683
39+ // ECONNREFUSED or ECONNRESET errors can happen if this connection is still
40+ // establishing while the server has already closed.
41+ // EMFILE can happen if the worker __and__ the server had already closed.
3842 s . on ( 'error' , function ( err ) {
3943 if ( ( err . code !== 'ECONNRESET' ) &&
40- ( ( err . code !== 'ECONNREFUSED' ) ) ) {
44+ ( err . code !== 'ECONNREFUSED' ) &&
45+ ( err . code !== 'EMFILE' ) ) {
4146 throw err ;
4247 }
4348 } ) ;
You can’t perform that action at this time.
0 commit comments