Преглед изворни кода

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.
Andrew Kaster пре 1 година
родитељ
комит
e30ecacb71
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      Userland/Services/WebWorker/ConnectionFromClient.cpp

+ 3 - 1
Userland/Services/WebWorker/ConnectionFromClient.cpp

@@ -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)