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

connectOnCreate options #229

Open
3 tasks
robertmazzo opened this issue Mar 29, 2023 · 0 comments
Open
3 tasks

connectOnCreate options #229

robertmazzo opened this issue Mar 29, 2023 · 0 comments

Comments

@robertmazzo
Copy link

robertmazzo commented Mar 29, 2023

  • I have searched for similar issues in this repository, but couldn't find one.
  • [x ] I have read the README and have a basic understanding how angular works.

I'm submitting a...

  • Regression (a behavior that used to work and stopped working in a new release)
  • [x ] Bug report  
  • Feature request

Current behavior

I'm in Angular 14, and passing in an empty connection object into my Angular Service code. And I was wondering why the browser was constantly checking for a ws connection on my local port '80'.
Turns out that in ngx-mqtt.js, on the _handlOnReconnect event on line 92, it appears to be retrying - event though this.options.connectOnCreate is undefined.
Then in mqtt.js, it tries to keep a ws conn inside function createBrowserWebSock(client, opts)

image

Expected behavior

If the connection object is empty in the application's app.module - {} - then it should NOT attempt to connect to the local websocket.

Minimal working example of the problem with instructions

What is the motivation / use case for changing the behavior?

image

Environment


ngx-mqtt version: 9.0.5


- Broker HiveMQ

Others:

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

No branches or pull requests

1 participant