开发者

Node-xmpp: Cannot read propery 'write' of undefined

I'm having an issue with node-xmpp, server-side settings out of my control maybe have changed but this error is relatively new. Looking for some pointers/insight, I've not been able to solve this issue within the module or my code. I unfortunately cannot provide my code 开发者_运维问答to troubleshoot, however, it's on the simple xmpp.Client/send method. It's failing about 80% of the time is the kicker.

Thanks

Cannot read property 'write' of undefined at lib/node/.npm/ltx/0.0.5/package/lib/element.js:197:22 at Array.forEach (native)

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

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

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

Here's the source from connection.js in question:

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;
}
};
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜