|
@@ -445,7 +445,7 @@ WsManager.prototype.openTTConnect = function() {
|
|
let data = message.data;
|
|
let data = message.data;
|
|
if(data != 1) {
|
|
if(data != 1) {
|
|
if (Object.prototype.toString.call(data) === '[object ArrayBuffer]') {
|
|
if (Object.prototype.toString.call(data) === '[object ArrayBuffer]') {
|
|
- data = Codec.read(data);
|
|
|
|
|
|
+ // data = Codec.read(data);
|
|
}
|
|
}
|
|
this.emit('message', data)
|
|
this.emit('message', data)
|
|
}
|
|
}
|
|
@@ -476,6 +476,7 @@ WsManager.prototype.openH5Connect = function() {
|
|
let code = event.code
|
|
let code = event.code
|
|
let reason = event.reason
|
|
let reason = event.reason
|
|
let wasClean = event.wasClean
|
|
let wasClean = event.wasClean
|
|
|
|
+ clearInterval(this.keepAliveTimeout);
|
|
|
|
|
|
//只要关闭就重连(暂时性处理)
|
|
//只要关闭就重连(暂时性处理)
|
|
if(this._reconnection) {
|
|
if(this._reconnection) {
|
|
@@ -495,6 +496,7 @@ WsManager.prototype.openH5Connect = function() {
|
|
}
|
|
}
|
|
|
|
|
|
_socket.onerror = (event) => {
|
|
_socket.onerror = (event) => {
|
|
|
|
+ clearInterval(this.keepAliveTimeout);
|
|
if(this._reconnection) {
|
|
if(this._reconnection) {
|
|
this.reconnect()
|
|
this.reconnect()
|
|
} else {
|
|
} else {
|