simple-xmpp/node-simple-xmpp

<error code="500" type="wait"><resource-constraint> in presence

Closed this issue · 2 comments

I've created a simple XMPP bot that connects to XMPP and sits quietly watching for status changes. Sometimes, instead of correct presence information, I get this:

<presence from="example@gmail.com" to="me@jabber.org/0fcabd76270901f9" type="error" xmlns:stream="http://etherx.jabber.org/streams">
    <error code="500" type="wait">
        <resource-constraint xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
</presence>

How do I solve this?

I'm going to remove this to see if it helps:

//make the connection live
setInterval(function() {
   conn.send(new xmpp.Element('presence'));
}, 1000 * 10)

Why is this in the code? It looks a bit odd - I've sniffed traffic from my XMPP client and looked at other examples and I haven't seen any others that send a <presence /> stanza every 10 seconds (my client only seems to do it when I change status).

This can be closed as #17 should fix it.