File tree 1 file changed +8
-3
lines changed
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.
1
3
'use strict' ;
2
4
3
5
const common = require ( '../common' ) ;
@@ -33,11 +35,14 @@ const server = net.createServer(function(s) {
33
35
worker . send ( { } , s , callback ) ;
34
36
} ) ;
35
37
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.
38
42
s . on ( 'error' , function ( err ) {
39
43
if ( ( err . code !== 'ECONNRESET' ) &&
40
- ( ( err . code !== 'ECONNREFUSED' ) ) ) {
44
+ ( err . code !== 'ECONNREFUSED' ) &&
45
+ ( err . code !== 'EMFILE' ) ) {
41
46
throw err ;
42
47
}
43
48
} ) ;
You can’t perform that action at this time.
0 commit comments