rpc: reimplement rpc id fix. closes #159.
This commit is contained in:
parent
2a17362fa0
commit
f2c53e2e08
@ -70,10 +70,7 @@ RPCBase.prototype.call = co(function* call(body, query) {
|
||||
|
||||
assert(Array.isArray(cmd.params), 'Params must be an array.');
|
||||
|
||||
if (!cmd.id)
|
||||
cmd.id = 0;
|
||||
|
||||
assert(typeof cmd.id === 'number', 'ID must be a number.');
|
||||
enforce(!cmd.id || typeof cmd.id !== 'object', 'Invalid ID.');
|
||||
}
|
||||
|
||||
for (i = 0; i < cmds.length; i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user