Skip to content

Commit

Permalink
fix: defer connect
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 committed May 8, 2022
1 parent b3c8c21 commit c79180b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions agent/src/agents/twitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ async function getChatAgent(
}
});

await twitch.chat.connect();

return twitch.chat;
}

Expand Down Expand Up @@ -258,6 +256,7 @@ async function join(

if (!agents[userId]) {
agents[userId] = await getChatAgent(firebase, agentId, username, userId);
await agents[userId].connect();
}
const chat = agents[userId];
log.info({ channel, agentId, provider }, "assigned to channel");
Expand Down

0 comments on commit c79180b

Please sign in to comment.