mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
1 sec backoff
This commit is contained in:
parent
f8a9d0ffb7
commit
341d6a86cb
1 changed files with 2 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ export function useEventSource({ url, withCredentials, onMessage }: UseEventSour
|
|||
handleMessage(event)
|
||||
}
|
||||
|
||||
sourceRef.current.onerror = (event) => {
|
||||
sourceRef.current.onerror = () => {
|
||||
if (isUnmountedRef.current) {
|
||||
return
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ export function useEventSource({ url, withCredentials, onMessage }: UseEventSour
|
|||
if (!isUnmountedRef.current) {
|
||||
createEventSource()
|
||||
}
|
||||
}, 5000 * retryCount) // Exponential backoff: 5s, 10s, 15s, etc.
|
||||
}, 1000 * retryCount) // Exponential backoff: 1s, 2s, 3s, etc.
|
||||
}
|
||||
}, [url, withCredentials, handleMessage, cleanup])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue