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:
parent
79fa892ca1
commit
e30ecacb71
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue