Skip to content

Commit

Permalink
fix bug with bad live feed reference
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecM33 committed Aug 11, 2024
1 parent f786b44 commit 0390209
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gameday.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ async function statusPoll (bot) {
function subscribe (bot, liveGame, games) {
LOGGER.trace('Gameday: subscribing...');
const ws = mlbAPIUtil.websocketSubscribe(liveGame.gamePk);
const feed = liveFeed.init(globalCache.values.game.currentLiveFeed);
ws.addEventListener('message', async (e) => {
try {
const feed = liveFeed.init(globalCache.values.game.currentLiveFeed);
const eventJSON = JSON.parse(e.data);
/*
Once in a while, Gameday will send us duplicate messages. They have different updateIds, but the exact
Expand Down

0 comments on commit 0390209

Please sign in to comment.