mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-31 10:52:47 +00:00
perf: sse
This commit is contained in:
parent
b142c04b95
commit
78906d8557
|
|
@ -83,6 +83,7 @@ export const sseResponse = ({
|
|||
event?: string;
|
||||
data: string;
|
||||
}) => {
|
||||
if (res.closed) return;
|
||||
event && res.write(`event: ${event}\n`);
|
||||
res.write(`data: ${data}\n\n`);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue