Closed mickel8 closed 2 months ago
You should consult the underlying web server. In particular, I would expect the process to be killed (unless you are trapping exits, which then means you should handle the exit message accordingly).
Thanks! This is indeed a problem with a Bandit, or at least, when I switched to the cowboy, everything works as expected. I have moved the issue to mtrudel/bandit#344
Hi, I have implemented SSE (Server-Sent-Events) using Plug and they work really cool until a user closes browser's tab. For some reason, my Plug.Conn isn't notified/invalidated and I can still send data (although it doesn't appear in Wireshark). How can I detect that the user has closed the tab and stop the loop? The code looks more or less like this: