2

我遇到了 node-xmpp 的问题,我无法控制的服务器端设置可能已经改变,但这个错误是相对较新的。寻找一些指针/见解,我无法在模块或我的代码中解决这个问题。不幸的是,我无法提供我的代码进行故障排除,但是,它位于简单的 xmpp.Client/send 方法上。大约 80% 的时间都失败了。

谢谢

无法 在 Array.forEach(本机)的 lib/node/.npm/ltx/0.0.5/package/lib/element.js:197:22 读取未定义的属性“写入”

在 lib/node/.npm/ltx/0.0.5/package/lib/element 的 Element.write (lib/node/.npm/ltx/0.0.5/package/lib/element.js:196:23)。 js:198:23 at Array.forEach (native)

在 lib/node/.npm/ltx/0.0.5/package/lib/element 的 Element.write (lib/node/.npm/ltx/0.0.5/package/lib/element.js:196:23)。 js:198:23 at Array.forEach (native)

在 Element.write (lib/node/.npm/ltx/0.0.5/package/lib/element.js:196:23) 在 Client.send (lib/node/.npm/node- xmpp/0.2.10/包/lib/xmpp/connection.js:76:12 )

以下是有问题的 connection.js 的来源:

Connection.prototype.send = function(stanza) {
if (!this.socket.writable) {
    this.socket.end();
    return;
}

if (stanza.root) {
    var el = this.rmStreamNs(stanza.root());
    var socket = this.socket;
    el.write(function(s) { socket.write(s); });  // LINE 76
    return el;
} else {
    this.socket.write(stanza);
    return stanza;
}
};
4

0 回答 0