From f69dcbdda985e36c250552504f3a2e9cdb39840d Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 13 Sep 2023 14:48:16 +0200 Subject: [PATCH] Fix 'Unhandled RPC' log with isNewChannel --- lib/commands/channel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/commands/channel.js b/lib/commands/channel.js index c3d354881..72b9d6bcd 100644 --- a/lib/commands/channel.js +++ b/lib/commands/channel.js @@ -254,7 +254,8 @@ var ARRAY_LINE = /^\[/; call back with true if the channel log has no content other than metadata otherwise false */ -Channel.isNewChannel = function (Env, channel, cb) { +Channel.isNewChannel = function (Env, channel, _cb) { + var cb = Util.once(_cb); if (!Core.isValidId(channel)) { return void cb('INVALID_CHAN'); } if (channel.length !== HK.STANDARD_CHANNEL_LENGTH && channel.length !== HK.ADMIN_CHANNEL_LENGTH) { return void cb('INVALID_CHAN'); }