Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add error listener #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix: add error listener #2

wants to merge 2 commits into from

Conversation

hugocortes
Copy link
Contributor

  • Adds channel listeners and emits an error to Transporter on channel close or error
  • Since channel connection is promise based, failed flag is added as a way to check if the connection failed.
    • Preferred approach would be to expose a Promise based connection establisher which creates the Transporter instance with promise result however this would need a refactor for all other extensions

example:

const instance = await extension
  .load(options)
  .then((client) => {
      return new extension(options, client)
  })
// additional Transporter config

Depends on myDevicesIoT/transporter#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant