diff --git a/lib/index.js b/lib/index.js index 025312b..11b75ba 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5356,6 +5356,7 @@ class StompMessagingClient extends MessageClient { // websocket错误处理 this.cli.onWebSocketError = (err) => { console.error('websocket错误', err); + this.emit('disconnected', ''); }; this.cli.activate(); } diff --git a/package.json b/package.json index 0237f14..0f30181 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "graphic-pixi", - "version": "0.1.2", + "version": "0.1.3", "description": "基于pixijs的图形应用、绘制应用框架", "productName": "Graphic-pixi", "author": "walker ", diff --git a/src/message/WsMsgBroker.ts b/src/message/WsMsgBroker.ts index 5d1c80f..9e54f8d 100644 --- a/src/message/WsMsgBroker.ts +++ b/src/message/WsMsgBroker.ts @@ -45,6 +45,7 @@ export class StompMessagingClient extends MessageClient { // websocket错误处理 this.cli.onWebSocketError = (err: Event) => { console.error('websocket错误', err); + this.emit('disconnected', ''); }; this.cli.activate();