|
|
@@ -38,12 +38,14 @@ class SseSource {
|
|
|
|
|
|
this.eventSource = new EventSourcePolyfill(
|
|
|
this.url.toString(),
|
|
|
- { withCredentials: this.withCredentials }
|
|
|
+ {
|
|
|
+ withCredentials: this.withCredentials,
|
|
|
+ heartbeatTimeout: 45 * 1000 // in ms, timeout can not be disabled yet, so I set it very large instead
|
|
|
+ }
|
|
|
);
|
|
|
|
|
|
this.eventSource.onerror = (event) => {
|
|
|
- console.error('SSE - An error happened : ' + JSON.stringify(event))
|
|
|
- this.unsubscribe()
|
|
|
+ console.error('SSE - An error happened')
|
|
|
}
|
|
|
this.eventSource.onopen = () => {
|
|
|
console.log('SSE - Listening for events...')
|