◐ Shell
clean mode source ↗

child_process: swallow errors in internal communication · nodejs/node@ea4be72

@@ -16,7 +16,7 @@ const key = 'test-key';

16161717

const list = new SocketListSend(child, 'test');

181819-

list._request('msg', 'cmd', common.mustCall((err) => {

19+

list._request('msg', 'cmd', false, common.mustCall((err) => {

2020

common.expectsError({

2121

code: 'ERR_CHILD_CLOSED_BEFORE_REPLY',

2222

type: Error,

@@ -30,7 +30,7 @@ const key = 'test-key';

3030

{

3131

const child = Object.assign(new EventEmitter(), {

3232

connected: true,

33-

send: function(msg) {

33+

_send: function(msg) {

3434

process.nextTick(() =>

3535

this.emit('internalMessage', { key, cmd: 'cmd' })

3636

);

@@ -39,7 +39,7 @@ const key = 'test-key';

39394040

const list = new SocketListSend(child, key);

414142-

list._request('msg', 'cmd', common.mustCall((err, msg) => {

42+

list._request('msg', 'cmd', false, common.mustCall((err, msg) => {

4343

assert.strictEqual(err, null);

4444

assert.strictEqual(msg.cmd, 'cmd');

4545

assert.strictEqual(msg.key, key);

@@ -53,12 +53,12 @@ const key = 'test-key';

5353

{

5454

const child = Object.assign(new EventEmitter(), {

5555

connected: true,

56-

send: function(msg) { process.nextTick(() => this.emit('disconnect')); }

56+

_send: function(msg) { process.nextTick(() => this.emit('disconnect')); }

5757

});

58585959

const list = new SocketListSend(child, key);

606061-

list._request('msg', 'cmd', common.mustCall((err) => {

61+

list._request('msg', 'cmd', false, common.mustCall((err) => {

6262

common.expectsError({

6363

code: 'ERR_CHILD_CLOSED_BEFORE_REPLY',

6464

type: Error,

@@ -73,7 +73,7 @@ const key = 'test-key';

7373

{

7474

const child = Object.assign(new EventEmitter(), {

7575

connected: true,

76-

send: function(msg) {

76+

_send: function(msg) {

7777

assert.strictEqual(msg.cmd, 'NODE_SOCKET_NOTIFY_CLOSE');

7878

assert.strictEqual(msg.key, key);

7979

process.nextTick(() =>

@@ -98,7 +98,7 @@ const key = 'test-key';

9898

const count = 1;

9999

const child = Object.assign(new EventEmitter(), {

100100

connected: true,

101-

send: function(msg) {

101+

_send: function(msg) {

102102

assert.strictEqual(msg.cmd, 'NODE_SOCKET_GET_COUNT');

103103

assert.strictEqual(msg.key, key);

104104

process.nextTick(() =>

@@ -127,7 +127,7 @@ const key = 'test-key';

127127

const count = 1;

128128

const child = Object.assign(new EventEmitter(), {

129129

connected: true,

130-

send: function() {

130+

_send: function() {

131131

process.nextTick(() => {

132132

this.emit('disconnect');

133133

this.emit('internalMessage', { key, count, cmd: 'NODE_SOCKET_COUNT' });