1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 21:35:07 +00:00

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.
This commit is contained in:
Andreas Kling 2020-07-06 13:27:25 +02:00
parent a122a544da
commit 6f059ee830
3 changed files with 8 additions and 15 deletions

View file

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