mirror of https://github.com/huashengdun/webssh
Defined a method onerror on reader
parent
4c3120e5ad
commit
3dd7b98c02
|
@ -213,7 +213,7 @@ jQuery(function($){
|
|||
sock.onmessage = function(msg) {
|
||||
var reader = new window.FileReader();
|
||||
|
||||
reader.onloadend = function(){
|
||||
reader.onload = function(){
|
||||
var text = decoder.decode(reader.result);
|
||||
// console.log(text);
|
||||
if (term) {
|
||||
|
@ -225,11 +225,15 @@ jQuery(function($){
|
|||
}
|
||||
};
|
||||
|
||||
reader.onerror = function(e) {
|
||||
console.error(e);
|
||||
};
|
||||
|
||||
reader.readAsArrayBuffer(msg.data);
|
||||
};
|
||||
|
||||
sock.onerror = function(e) {
|
||||
console.log(e);
|
||||
console.error(e);
|
||||
};
|
||||
|
||||
sock.onclose = function(e) {
|
||||
|
|
Loading…
Reference in New Issue