astro/node-xmpp — pull request #40 by georgeye (2011-10-20 21:29:15+00:00)
Title: emit conn-close on connection end event.

Hi Astro,

I found the node-xmpp is great most of the time. One thing I think we can improve is to detect socket disconnect and report to caller. I made a little change in connection.js and it seems working for me.
Usage example of to listen 'conn-close' event at Client.
cl = new xmpp.Client()
cl.on('conn-close', function() {
console.log('connection ends');
});

I think doing auto-reconnect directly at Client is also possible. Able to report disconnect looks a MUST to have to me.

Cheers,
George