mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibCore: Make LocalServer::take_over_from_system_server() return ErrorOr
This allows us to use TRY() or MUST() when calling it.
This commit is contained in:
parent
229a45ab14
commit
81047d8f9c
13 changed files with 41 additions and 53 deletions
|
@ -18,8 +18,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto app = TRY(GUI::Application::try_create(arguments));
|
||||
auto server = TRY(Core::LocalServer::try_create());
|
||||
|
||||
bool ok = server->take_over_from_system_server();
|
||||
VERIFY(ok);
|
||||
TRY(server->take_over_from_system_server());
|
||||
server->on_accept = [&](auto client_socket) {
|
||||
static int s_next_client_id = 0;
|
||||
int client_id = ++s_next_client_id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue