I am testing your example ./example/sse-server.js and all works fine under normal circumstances. For example calling curl http://192.168.0.20:8080/sse will start the events (new connection). Cancelling curl (Ctrl +c) will cancel the events (lost connection)
But the "res.on('close'...." does not work when the connection has been lost under abnormal circumstances for example when I switch off the computer (very simple to test with VirtualBox).
Is there any way on detecting this or this is a issue with SSE?
I am testing your example ./example/sse-server.js and all works fine under normal circumstances. For example calling curl http://192.168.0.20:8080/sse will start the events (new connection). Cancelling curl (Ctrl +c) will cancel the events (lost connection)
But the "res.on('close'...." does not work when the connection has been lost under abnormal circumstances for example when I switch off the computer (very simple to test with VirtualBox).
Is there any way on detecting this or this is a issue with SSE?