mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-21 03:10:50 +00:00
fix: destroy后仍有push流
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user