http: fix json rpc id handling. see #159.
This commit is contained in:
parent
604362effd
commit
667b0e746d
@ -550,10 +550,7 @@ HTTPServer.prototype._init = function _init() {
|
||||
|
||||
enforce(Array.isArray(cmd.params), 'Params must be an array.');
|
||||
|
||||
if (!cmd.id)
|
||||
cmd.id = 0;
|
||||
|
||||
enforce(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