From 8afd1acd15d5ba96544749b8e3c50014a5fdb1a9 Mon Sep 17 00:00:00 2001 From: satori Date: Wed, 15 Dec 2021 00:40:42 +0800 Subject: [PATCH] debug --- fmhub.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fmhub.js b/fmhub.js index 8abb7af..6b7ade9 100644 --- a/fmhub.js +++ b/fmhub.js @@ -40,7 +40,10 @@ export default class { channel.forEach((value, userid) => { console.log(userid, value) let user = this.users.get(userid) || new Map() - if (!user.size) return console.log("订阅频道的用户不在线, 应移除此订阅"); + if (!user.size) { + console.log(user) + return console.log(`订阅频道的用户 ${userid} 没有会话连接, 应移除此订阅记录`); + } user.forEach((value, ws) => { ws.send(msg) })