diff --git a/src/websocket.js b/src/websocket.js index 43280a0..6abbeb1 100644 --- a/src/websocket.js +++ b/src/websocket.js @@ -121,6 +121,8 @@ class Websocket { errorString += ' - ' + text; } log.error(errorString); + // The stream error is sent to the Strophe error method, allowing it to be handled. + Strophe.error(errorString); // close the connection on stream_error this._conn._changeConnectStatus(connectstatus, condition);