mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
test
This commit is contained in:
@@ -36,13 +36,12 @@ WSSHClient.prototype.connect = function (options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this._connection.onmessage = function (evt) {
|
this._connection.onmessage = function (evt) {
|
||||||
var data = JSON.parse(evt.data.toString());
|
try{
|
||||||
if (data.error !== undefined) {
|
options.onData(evt.data);
|
||||||
|
} catch (e) {
|
||||||
|
var data = JSON.parse(evt.data.toString());
|
||||||
options.onError(data.error);
|
options.onError(data.error);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
options.onData(data);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this._connection.onclose = function (evt) {
|
this._connection.onclose = function (evt) {
|
||||||
|
Reference in New Issue
Block a user