|
@@ -7,7 +7,7 @@ export class ConnectController extends BasicController {
|
|
constructor(...args) {
|
|
constructor(...args) {
|
|
super(...args);
|
|
super(...args);
|
|
this.roomController = new RoomController(this.io, this.socket, this.redisCli);
|
|
this.roomController = new RoomController(this.io, this.socket, this.redisCli);
|
|
- this.syncDeviceController = new SyncDeviceController(this.io, this.socket, this.redisCli,this.roomController);
|
|
|
|
|
|
+ this.syncDeviceController = new SyncDeviceController(this.io, this.socket, this.redisCli, this.roomController);
|
|
}
|
|
}
|
|
async run() {
|
|
async run() {
|
|
await this.roomController.run();
|
|
await this.roomController.run();
|
|
@@ -15,7 +15,8 @@ export class ConnectController extends BasicController {
|
|
|
|
|
|
this.socket.on("disconnect", (reason) => {
|
|
this.socket.on("disconnect", (reason) => {
|
|
const res = String(reason).split(" ");
|
|
const res = String(reason).split(" ");
|
|
- console.log('disconnect-reason',res)
|
|
|
|
|
|
+ console.log("disconnect-reason", res);
|
|
|
|
+ this.roomController.logger.info("断开连接", { userId: this.userId, from });
|
|
if (res.includes("close") || res.includes("disconnect")) {
|
|
if (res.includes("close") || res.includes("disconnect")) {
|
|
if ([FROMTYPE.MiniAPP].includes(Number(this.roomController.user.from))) {
|
|
if ([FROMTYPE.MiniAPP].includes(Number(this.roomController.user.from))) {
|
|
this.roomController.logger.info("断开连接");
|
|
this.roomController.logger.info("断开连接");
|