Skip to content

fix: add error listener#2

Open
hugocortes wants to merge 2 commits into
masterfrom
fix/err-handling
Open

fix: add error listener#2
hugocortes wants to merge 2 commits into
masterfrom
fix/err-handling

Conversation

@hugocortes

Copy link
Copy Markdown
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