mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
abort stream when conversationId updates
This commit is contained in:
@@ -55,12 +55,8 @@ export default function Conversation() {
|
||||
}, []);
|
||||
|
||||
useEffect(()=>{
|
||||
return () => {
|
||||
if (status !== 'idle') {
|
||||
fetchStream.current && fetchStream.current.abort(); //abort previous stream
|
||||
}
|
||||
};
|
||||
}, [status]);
|
||||
fetchStream.current && fetchStream.current.abort();
|
||||
},[conversationId]);
|
||||
|
||||
useEffect(() => {
|
||||
const observerCallback: IntersectionObserverCallback = (entries) => {
|
||||
|
||||
Reference in New Issue
Block a user