Skip to content

Commit

Permalink
fix : cloud ping
Browse files Browse the repository at this point in the history
  • Loading branch information
iqeq1945 committed Dec 13, 2024
1 parent 02b0830 commit 7f91376
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/socket/socket.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export class SocketGateway
this.game = {};
setInterval(async () => {
this.roomlist = await this.socketService.getRoomList();
}, 5000);
}, 3000);
// 서버를 service와 연결
this.lastService.server = this.server;
this.kungService.server = this.server;
Expand Down Expand Up @@ -338,7 +338,6 @@ export class SocketGateway
// 서버에접속해있는 유저에게 현재 방들의 정보 List 전달
@SubscribeMessage('roomList')
async handleRoomList(@ConnectedSocket() client: Socket) {
console.log(this.roomlist);
client.emit('roomList', this.roomlist);
}

Expand Down Expand Up @@ -1223,7 +1222,7 @@ export class SocketGateway
// ping
@SubscribeMessage('cloud.ping')
handleCloudPing(@MessageBody() roomId: string) {
let time = 30;
let time = 60;
const timeId = setInterval(() => {
this.server.to(roomId).emit('cloud.ping');
time--;
Expand Down

0 comments on commit 7f91376

Please sign in to comment.