Detect close
Closed this issue · 3 comments
fakerybakery commented
Hi
Is it possible to detect when the SSE is closed?
Thanks!
mpetazzoni commented
If the connection is closed by the server, you should receive an abort
event, which you need to listen for:
var source = new SSE(url, {start: false});
source.addEventListener('abort', function(e) { ... });
source.stream();
fakerybakery commented
Thanks!
jayarjo commented
Don't receive abort
event. Ended up using custom complete
event.