gpt4 book ai didi

node.js - Nodejs 类型错误 : Cannot read property 'chId' of undefined

转载 作者:太空宇宙 更新时间:2023-11-04 02:48:02 24 4
gpt4 key购买 nike

我有 Omegle 克隆聊天服务。在压力下,我的nodejs(超过150个用户)崩溃并出现错误“TypeError:无法读取未定义的属性'chId'”。

/home/kotka/randomi.fi/beta/varaserver2/channel.js:67
f = this.channels[e].chId;
^
TypeError: Cannot read property 'chId' of undefined
at Channel.joinChannel (/home/kotka/randomi.fi/beta/varaserver2/channel.js:67:23)
at Session.createSession (/home/kotka/randomi.fi/beta/varaserver2/session.js:21:23)
at /home/kotka/randomi.fi/beta/varaserver2/path.js:1:268
at Server.<anonymous> (/home/kotka/randomi.fi/beta/varaserver2/fu.js:43:3)
at Server.emit (events.js:70:17)
at HTTPParser.onIncoming (http.js:1610:12)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:91:29)
at Socket.ondata (http.js:1506:22)
at TCP.onread (net.js:374:27)

问题是什么以及如何解决它?

channel.js source

最佳答案

尝试使用

捕获异常
process.on('uncaughtException', function(err) {
console.error(err.stack);
});

关于node.js - Nodejs 类型错误 : Cannot read property 'chId' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13916113/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com