|
@@ -27,7 +27,7 @@ export class ConnectController extends BasicController {
|
|
|
const roomConfigId = this.roomController.roomConfigId;
|
|
|
|
|
|
if (disMissRoomId === roomId) {
|
|
|
- this.logger.info("subscribe-订阅", disMissRoomId, userId, roomId, user);
|
|
|
+ this.logger.info("subscribe-订阅-配对", disMissRoomId, userId, roomId, user);
|
|
|
this.roomController.roomAssistant.notifyRoomDismiss(roomId);
|
|
|
this.roomController.roomAssistant.stopCall(roomId, userId, user);
|
|
|
this.roomController.roomAssistant.destoryRoom(sessionId, roomConfigId);
|
|
@@ -36,14 +36,18 @@ export class ConnectController extends BasicController {
|
|
|
});
|
|
|
|
|
|
this.socket.on("reconnect", () => {
|
|
|
- this.logger.info("重新连接");
|
|
|
+ this.logger.warn("重新连接");
|
|
|
this.run();
|
|
|
});
|
|
|
+ this.socket.on("error", (err) => {
|
|
|
+ this.logger.error(`连接错误,原因: ${err.message}`);
|
|
|
+ this.redisSubClient.unsubscribe("dismissRoom");
|
|
|
+ });
|
|
|
|
|
|
this.socket.on("disconnect", async (reason) => {
|
|
|
const res = String(reason).split(" ");
|
|
|
console.log("disconnect-reason", res);
|
|
|
-
|
|
|
+ this.redisSubClient.unsubscribe("dismissRoom");
|
|
|
// if (res.includes("close") || res.includes("disconnect")) {
|
|
|
if ([FROMTYPE.MiniAPP].includes(Number(this.roomController.user.from))) {
|
|
|
const userId = this.roomController.userId;
|