Open garzj opened 2 months ago
Hey there - thanks for this. I'll test the warning, but the terminate functionality is intentional, in response to security concerns, so that stays.
Oh, I did leave the termination logic, just changed it up a bit. The window unload event may be skipped in certain cases, so the server should now close after a timeout of 10 seconds if the frontend stops sending keep alives. Also, another unload handler may interfere with the added warning if the event order is incorrect, that's why I cared in the first place.
It may still be better to do it your way to prevent unintentional server shutdowns. If the server keeps running, it shouldn't be that of an issue, since it's just reachable from localhost, not from 0.0.0.0.
I added these two little features, it felt like this warning is a necessity. Thank you for this project!