freedomjs/freedom-social-xmpp — pull request #49 by dborkan (2014-06-17 20:31:34+00:00)
Title: Set reconnect=true, add error trace to help detect disconnects

Added to help resolve issue https://github.com/uProxy/uProxy/issues/224

Setting reconnect=true should result in the Client object automatically trying to reconnect to XMPP in case of an error. I've also added error trace to offline, close, and end events in the client to help us debug if these occur.

I'm not sure how to force the XMPP network to disconnect me, so don't know the best way to test this. Right now I've been able to trigger the close event by calling client.connection.socket.destroy(). I don't see the end or offline events being fired yet, but I think trace here is a good idea so we can better debug when logouts do occur.