Skip to content

Commit

Permalink
fix(api/utils): fix cannot request chat after error (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
ungarscool1 authored Aug 28, 2024
1 parent b0e492b commit 208eb92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/src/utils/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export class Generation {
child.data.on('close', async () => {
if (response.startsWith('<!--ERROR:')) {
res.end();
this.chatsProcess.splice(this.chatsProcess.findIndex(c => c.user === user?.preferred_username), 1);
return;
}
try {
Expand Down Expand Up @@ -280,4 +281,4 @@ export class Generation {
}
return false;
}
}
}

0 comments on commit 208eb92

Please sign in to comment.