1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

WebWorker: Exit the event loop when the connection from the client dies

This mimics the behavior of other services, and prevents zombie service
processes from sticking around when no longer needed.
This commit is contained in:
Andrew Kaster 2023-11-22 09:49:10 -07:00 committed by Andreas Kling
parent 79fa892ca1
commit e30ecacb71

View file

@ -12,7 +12,9 @@ namespace WebWorker {
void ConnectionFromClient::die()
{
// FIXME: Do something here (shutdown process/script gracefully?)
// FIXME: When handling multiple workers in the same process,
// this logic needs to be smarter (only when all workers are dead, etc).
Core::EventLoop::current().quit(0);
}
void ConnectionFromClient::request_file(Web::FileRequest request)