Closed
Description
I would like to implement a retry mecanism,
I assume Jsforce.Connection
is the object to start with.
I see it extends a EventEmitter
.. So what I'm trying (expecting in a way) is something like this:
connection.on('connection', function () {
this.logger.log('@@@@@ Connected to Salesforce @@@@');
});
connection.getConnection().on('disconnect', function () {
this.logger.log('@@@@@ Disconnected from Salesforce @@@@');
});
// there is only 'connection:new' being emitted in the code as far as I searched, but it does not work neither
I don't know if these are events proposed by JSForce, these are not typed,
Furthermore Is this the right way ? to handle reconnections ?
Thanks to everyone in advance.