Skip to content

Commit

Permalink
fix: 비동기라서 throw error 안되는 문제 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
rladydgn committed Dec 6, 2023
1 parent ffefa65 commit c41e00b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions be/algo-with-me-api/src/dashboard/dashboard.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export class DashboardGateway implements OnGatewayConnection {
client.emit('dashboard', dashboard);
}

public handleConnection(client: Socket, ...args: any[]) {
public async handleConnection(client: Socket, ...args: any[]) {
try {
const { competitionId } = client.handshake.query;
client.data['competitionId'] = competitionId;
this.competitionService.isCompetitionFinished(Number(competitionId));
await this.competitionService.isCompetitionFinished(Number(competitionId));
client.join(competitionId);
this.logger.debug(
`dashboard 웹소켓 연결 성공, competition id: ${competitionId}, client id: ${client.id}, args: ${args}`,
Expand Down

0 comments on commit c41e00b

Please sign in to comment.