simple-xmpp / node-simple-xmpp

Simple High Level NodeJS XMPP Client
301 stars 90 forks source link

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

Closed Daniel15 closed 11 years ago

Daniel15 commented 11 years ago

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?

Daniel15 commented 11 years ago

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).

Daniel15 commented 11 years ago

This can be closed as #17 should fix it.