mirror of
https://github.com/facundoolano/jorge.git
synced 2024-12-26 21:58:51 +01:00
fix: close sse client before attempting a reconnection
This commit is contained in:
parent
17c6c46eab
commit
e7b552b476
1 changed files with 2 additions and 1 deletions
|
@ -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();`
|
||||||
|
|
Loading…
Reference in a new issue