eclipse-paho / eclipse-paho/paho.mqtt.javascript
client.isConnected does not return valid status
Open
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 466
- PR merge metrics
- No merged PRs in 30d
Description
Example code:
```
if (client && client.isConnected) {
client.disconnect()
}
```
Sometimes throws an exception:
`AMQJS0011E Invalid state not connecting or connected.`
* Chrome 70.0.3538
* mac OS 10.14.1
Contributor guide
Research direction
Start by reproducing the example using client.isConnected and client.disconnect in the reported Chrome and macOS environment. Trace the state checks around these entry points and define done as isConnected reliably reporting a usable connection state without the AMQJS0011E exception during disconnect.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100