eclipse / paho.mqtt.javascript

paho.mqtt.javascript
Other
1.14k stars 468 forks source link

disambiguate client vs server disconnections #142

Closed boneskull closed 6 years ago

boneskull commented 6 years ago

Regardless of whether the client or server initiates a disconnection, the onFailure callback is executed. These should be two discrete events; a client-initiated disconnection is not a "failure".

boneskull commented 6 years ago

I'm wrong; there's onConnectionLost which is a property that can be set after an instance has been constructed. This is rather unusual, anyhow, so #141 applies here.