Skip to content

Any connection events ? #1372

Closed
Closed
@bacloud22

Description

@bacloud22

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions