From d33719452ca344d1981d0fcb25ded896565fa277 Mon Sep 17 00:00:00 2001 From: zWing <371657110@qq.com> Date: Mon, 10 Oct 2022 15:59:15 +0800 Subject: [PATCH] feat(server): support reject with message --- lib/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server.js b/lib/server.js index 4f6fd1f6..94282e87 100644 --- a/lib/server.js +++ b/lib/server.js @@ -545,7 +545,7 @@ class Client extends EventEmitter { let replied = false; let accept; - const reject = () => { + const reject = (msg = '') => { if (replied) return; replied = true; @@ -559,7 +559,7 @@ class Client extends EventEmitter { if (localChan !== -1) this._chanMgr.remove(localChan); - proto.channelOpenFail(info.sender, reason, ''); + proto.channelOpenFail(info.sender, reason, msg); }; const reserveChannel = () => { localChan = this._chanMgr.add();