faye/faye — pull request #334 by fasmide (2014-09-19 09:44:44+00:00)
Title: Add callback to client's disconnect method

In my node to node client i currently have something like this:

```
process.on('SIGINT', function() {
console.log('Got SIGINT signal, let me just disconnect...');
client.disconnect();
setTimeout(function() {
process.exit(0);
}, 1000);

});
```

I believe this approach is somewhat cleaner:
```
process.on('SIGINT', function() {
console.log('Got SIGINT signal, let me just disconnect...');
client.disconnect(function() {
process.exit(0);
});
});
```

However - i dont know if this will break the api ? - the client.disconnect() should work just as before if no callback is provided