Skip to content

Commit

Permalink
fixup: param order
Browse files Browse the repository at this point in the history
  • Loading branch information
apapirovski committed Jun 5, 2018
1 parent 086ab4e commit c37af92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/internal/socket_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SocketListSend extends EventEmitter {
child.once('exit', () => this.emit('exit', this));
}

_request(msg, cmd, callback, swallowErrors = false) {
_request(msg, cmd, swallowErrors, callback) {
var self = this;

if (!this.child.connected) return onclose();
Expand All @@ -40,14 +40,14 @@ class SocketListSend extends EventEmitter {
this._request({
cmd: 'NODE_SOCKET_NOTIFY_CLOSE',
key: this.key
}, 'NODE_SOCKET_ALL_CLOSED', callback, true);
}, 'NODE_SOCKET_ALL_CLOSED', true, callback);
}

getConnections(callback) {
this._request({
cmd: 'NODE_SOCKET_GET_COUNT',
key: this.key
}, 'NODE_SOCKET_COUNT', function(err, msg) {
}, 'NODE_SOCKET_COUNT', false, function(err, msg) {
if (err) return callback(err);
callback(null, msg.count);
});
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-internal-socket-list-send.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const key = 'test-key';

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

list._request('msg', 'cmd', common.mustCall((err) => {
list._request('msg', 'cmd', false, common.mustCall((err) => {
common.expectsError({
code: 'ERR_CHILD_CLOSED_BEFORE_REPLY',
type: Error,
Expand All @@ -39,7 +39,7 @@ const key = 'test-key';

const list = new SocketListSend(child, key);

list._request('msg', 'cmd', common.mustCall((err, msg) => {
list._request('msg', 'cmd', false, common.mustCall((err, msg) => {
assert.strictEqual(err, null);
assert.strictEqual(msg.cmd, 'cmd');
assert.strictEqual(msg.key, key);
Expand All @@ -58,7 +58,7 @@ const key = 'test-key';

const list = new SocketListSend(child, key);

list._request('msg', 'cmd', common.mustCall((err) => {
list._request('msg', 'cmd', false, common.mustCall((err) => {
common.expectsError({
code: 'ERR_CHILD_CLOSED_BEFORE_REPLY',
type: Error,
Expand Down

0 comments on commit c37af92

Please sign in to comment.