Skip to content

Commit

Permalink
fix : exit game clear ping time
Browse files Browse the repository at this point in the history
  • Loading branch information
iqeq1945 committed Nov 26, 2024
1 parent 2ca551f commit 6dc7fdf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/socket/socket.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,8 @@ export class SocketGateway
);
this.game[roomId].roundTime = this.roomInfo[roomId].time;

if (this.ping[roomId]) this.handlePong(roomId);

await this.lastService.handleStart(
roomId,
this.roomInfo[roomId],
Expand Down Expand Up @@ -909,6 +911,9 @@ export class SocketGateway
this.game[roomId].option = this.socketService.getOption(
this.roomInfo[roomId].option,
);

if (this.ping[roomId]) this.handlePong(roomId);

await this.kungService.handleStart(
roomId,
this.roomInfo[roomId],
Expand Down Expand Up @@ -1015,6 +1020,8 @@ export class SocketGateway
}
this.handleReady(roomId, client);

if (this.ping[roomId]) this.handlePong(roomId);

await this.bellService.handleStart(
roomId,
this.roomInfo[roomId],
Expand Down

0 comments on commit 6dc7fdf

Please sign in to comment.