mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix: destroy后仍有push流
This commit is contained in:
parent
30678d8ebf
commit
a35cda6873
|
|
@ -141,6 +141,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
console.log('pipe error', error);
|
||||
}
|
||||
// close stream
|
||||
!stream.destroyed && stream.push(null);
|
||||
stream.destroy();
|
||||
|
||||
const promptsLen = formatPrompts.reduce((sum, item) => sum + item.content.length, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue