sclausen / ngx-mqtt

This library isn't just a wrapper around MQTT.js for angular. It uses observables and takes care of subscription handling and message routing.
https://sclausen.github.io/ngx-mqtt/
MIT License
186 stars 82 forks source link

Allow to retrieve connection state #202

Open gtteamamxx opened 2 years ago

gtteamamxx commented 2 years ago

In actual state we can't retrieve mqtt connection state.

This is because state is wrapped to a Subject instead of the BehaviorSubject.

image

With this change we'll be able to get that by new property - connectionState