fix: close sse client before attempting a reconnection

This commit is contained in:
facundoolano 2024-02-29 13:37:22 -03:00
parent 17c6c46eab
commit e7b552b476

View file

@ -399,7 +399,8 @@ function newSSE() {
} }
eventSource.onerror = function (event) { eventSource.onerror = function (event) {
console.error('An error occurred:', event); console.error('An error occurred:', event);
setTimeout(newSSE, 1000) eventSource.close();
setTimeout(newSSE, 5000)
}; };
} }
newSSE();` newSSE();`