We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddf1e41 commit ee31816Copy full SHA for ee31816
src/gameserver/event-handler/live-match-update.handler.ts
@@ -18,13 +18,15 @@ export class LiveMatchUpdateHandler
18
) {}
19
20
async handle(event: LiveMatchUpdateEvent) {
21
- const session = await this.sessionRepo.findOneOrFail({
+ const session = await this.sessionRepo.findOne({
22
where: {
23
matchId: event.matchId,
24
},
25
relations: ["players"],
26
});
27
28
+ if (!session) return;
29
+
30
await this.dataSource.transaction(async (em) => {
31
session.timestamp = new Date(event.timestamp);
32
session.gameState = event.game_state;
0 commit comments