Closed vinnitu closed 12 years ago
Yes, according to the spec (XEP-0206 & XEP-0124), the
tag MUST have a tag terminate, but node-xmpp-bosh does not add that tag and instead relies on the client (or server) to close the connection (or terminate the stream). This is a bug, but not a very serious one.To detect such a situation, just bail out when you see a terminate attribute on a body tag OR a stream:error tag.
it seems we need to modify 3d-party library (jsjac) to detect situation and prevent auto reconnect for this case (((
True, will fix in future version.
Ok, Thanks.
This should be fixed on current master - let me know if it works for you.
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Cannot call method 'push' of undefined
at Object.enqueue_bosh_response (/var/www/home/user/node_modules/node-xmpp-bosh/src/session.js:838:50)
at Object.send_stream_terminate_response (/var/www/home/user/node_modules/node-xmpp-bosh/src/stream.js:82:17)
at _on_terminate (/var/www/home/user/node_modules/node-xmpp-bosh/src/bosh.js:260:16)
at BoshEventPipe.emit (/var/www/home/user/node_modules/node-xmpp-bosh/node_modules/eventpipe/eventpipe.js:63:25)
at Object.
PS: I am not sure I have right depends PSS: yesterday npm give me 0.5.6 version, but today 0.6.0 PSSS: i have 0.6.14 nodejs
Should be fixed now. Let me know if it still crashes.
It's OK.
I received such body if user open chat with same resource
<body xmlns="http://jabber.org/protocol/httpbind" stream="3a59e76d-8e39-40f8-aa7d-f5ea22cefed0"><stream:error xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0"><conflict xmlns="urn:ietf:params:xml:ns:xmpp-streams"/><text xml:lang="" xmlns="urn:ietf:params:xml:ns:xmpp-streams">Replaced by new connection</text></stream:error></body>
But I waiting for terminate in type attribute of body tag...
When I am wrong? And how to detect such situation?
Thx