Fix setMetadata RPC saferphore
This commit is contained in:
@@ -144,7 +144,7 @@ var handleCommand = Meta.handleCommand = function (meta, line) {
|
|||||||
throw new Error("METADATA_UNSUPPORTED_COMMAND");
|
throw new Error("METADATA_UNSUPPORTED_COMMAND");
|
||||||
}
|
}
|
||||||
|
|
||||||
commands[command](meta, args);
|
return commands[command](meta, args);
|
||||||
};
|
};
|
||||||
Meta.commands = Object.keys(commands);
|
Meta.commands = Object.keys(commands);
|
||||||
|
|
||||||
|
|||||||
1
rpc.js
1
rpc.js
@@ -394,6 +394,7 @@ var setMetadata = function (Env, data, unsafeKey, cb) {
|
|||||||
// if your command is valid but it didn't result in any change to the metadata,
|
// if your command is valid but it didn't result in any change to the metadata,
|
||||||
// call back now and don't write any "useless" line to the log
|
// call back now and don't write any "useless" line to the log
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
|
g();
|
||||||
return void cb(void 0, metadata);
|
return void cb(void 0, metadata);
|
||||||
}
|
}
|
||||||
Env.msgStore.writeMetadata(channel, JSON.stringify(line), function (e) {
|
Env.msgStore.writeMetadata(channel, JSON.stringify(line), function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user