diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-06 13:27:25 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-06 13:30:11 +0200 |
commit | 6f059ee83056098652f3acb4f43c13cd898b3d0a (patch) | |
tree | 9fb38d2912aca53d172099da46f43d5ee6490a3e /Services/ProtocolServer/ClientConnection.cpp | |
parent | a122a544da0f05263cfb8fe7841325ef58364bb8 (diff) | |
download | serenity-6f059ee83056098652f3acb4f43c13cd898b3d0a.zip |
ProtocolServer: Turn this into a multi-instance service
Everyone who connects to ProtocolServer now gets his own instance.
This means that different users can no longer talk to the same exact
ProtocolServer process, enhanching security and stability.
Diffstat (limited to 'Services/ProtocolServer/ClientConnection.cpp')
-rw-r--r-- | Services/ProtocolServer/ClientConnection.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Services/ProtocolServer/ClientConnection.cpp b/Services/ProtocolServer/ClientConnection.cpp index 2b72ef0025..cbe21dd1ef 100644 --- a/Services/ProtocolServer/ClientConnection.cpp +++ b/Services/ProtocolServer/ClientConnection.cpp @@ -48,6 +48,8 @@ ClientConnection::~ClientConnection() void ClientConnection::die() { s_connections.remove(client_id()); + if (s_connections.is_empty()) + Core::EventLoop::current().quit(0); } OwnPtr<Messages::ProtocolServer::IsSupportedProtocolResponse> ClientConnection::handle(const Messages::ProtocolServer::IsSupportedProtocol& message) |