Closed DieterGehring closed 6 years ago
I wonder if / how i can catch a websocket error during connection. Browsers shows me a WebSocket-Error when connection to a wrong host for instance. But how can I handle this in code?
In your connectOptions, you can add an onFailure callback which will handle this: https://www.eclipse.org/paho/files/jsdoc/Paho.MQTT.Client.html
onFailure
I wonder if / how i can catch a websocket error during connection. Browsers shows me a WebSocket-Error when connection to a wrong host for instance. But how can I handle this in code?