mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
Merge branch 'main' into next
This commit is contained in:
commit
c204b3890c
@ -55,6 +55,7 @@ export const startMsgSSEStreamWithRetry: () => () => void = () => {
|
||||
responseType: 'stream',
|
||||
adapter: 'fetch',
|
||||
});
|
||||
if (!res?.data) return;
|
||||
const stream = res.data;
|
||||
const reader = stream.pipeThrough(new TextDecoderStream()).getReader();
|
||||
retryTimes = 0;
|
||||
@ -74,7 +75,7 @@ export const startMsgSSEStreamWithRetry: () => () => void = () => {
|
||||
try {
|
||||
await createMsgSSEConnection(clientId);
|
||||
} catch (error) {
|
||||
console.error('Error during stream:', error.message);
|
||||
console.log(`sse connection for clientId ${clientId} failed, retrying...`, error);
|
||||
const nextDelay = retryTimes < 6 ? 1000 * Math.pow(2, retryTimes) : 60000;
|
||||
retryTimes++;
|
||||
setTimeout(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user