fix: streaming not close properly sometimes

This commit is contained in:
Tristan Yang
2023-02-13 07:38:03 +08:00
parent d5726043ab
commit 62b4c3ee72
3 changed files with 36 additions and 22 deletions
+1
View File
@@ -12,6 +12,7 @@ const InactiveScreen: FC<Props> = () => {
const { stopStreaming } = useStreaming();
// const [reloadVisible, setReloadVisible] = useState(false);
useEffect(() => {
console.info("debug SSE: stopStreaming at inactive screen");
stopStreaming();
const currTitle = document.title;
document.title = `[INACTIVE] ${currTitle}`;