删除sock测试和日志
This commit is contained in:
parent
9d37ecd035
commit
9e048bb56e
@ -42,16 +42,7 @@ StompClient.prototype = {
|
|||||||
// 注意sockjs会做降级处理,优先处理websockets,若浏览器不支持websockets
|
// 注意sockjs会做降级处理,优先处理websockets,若浏览器不支持websockets
|
||||||
// 则会降级为xhr_streaming(轮询),继续不支持的时候会降级为xhr-polling
|
// 则会降级为xhr_streaming(轮询),继续不支持的时候会降级为xhr-polling
|
||||||
this.socket = new SockJS(websocketUrl + getToken());
|
this.socket = new SockJS(websocketUrl + getToken());
|
||||||
var _transportClose = this.socket._transportClose;
|
|
||||||
const that111 = this;
|
|
||||||
this.socket._transportClose = function(code, reason) {
|
|
||||||
console.log(code, reason, '================', this._transport, this._transport.close);
|
|
||||||
// if (this._transport && this._transport.close) {
|
|
||||||
// this._transport.close();
|
|
||||||
// }
|
|
||||||
this._transportClose();
|
|
||||||
_transportClose.call(this, code, reason);
|
|
||||||
};
|
|
||||||
// 获取 STOMP 子协议的客户端对象
|
// 获取 STOMP 子协议的客户端对象
|
||||||
this.clientIns = Stomp.over(this.socket);
|
this.clientIns = Stomp.over(this.socket);
|
||||||
|
|
||||||
@ -177,7 +168,6 @@ StompClient.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
console.log('---------------------');
|
|
||||||
if (this.clientIns && this.clientIns.connected) {
|
if (this.clientIns && this.clientIns.connected) {
|
||||||
this.clientIns.disconnect();
|
this.clientIns.disconnect();
|
||||||
this.socket.close();
|
this.socket.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user