Skip to content

Commit ee31816

Browse files
committed
fix logging
1 parent ddf1e41 commit ee31816

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gameserver/event-handler/live-match-update.handler.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ export class LiveMatchUpdateHandler
1818
) {}
1919

2020
async handle(event: LiveMatchUpdateEvent) {
21-
const session = await this.sessionRepo.findOneOrFail({
21+
const session = await this.sessionRepo.findOne({
2222
where: {
2323
matchId: event.matchId,
2424
},
2525
relations: ["players"],
2626
});
2727

28+
if (!session) return;
29+
2830
await this.dataSource.transaction(async (em) => {
2931
session.timestamp = new Date(event.timestamp);
3032
session.gameState = event.game_state;

0 commit comments

Comments
 (0)