diff options
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/TelnetServer/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Services/TelnetServer/main.cpp b/Userland/Services/TelnetServer/main.cpp index 663a07b4e5..c2771048d2 100644 --- a/Userland/Services/TelnetServer/main.cpp +++ b/Userland/Services/TelnetServer/main.cpp @@ -135,7 +135,9 @@ int main(int argc, char** argv) run_command(ptm_fd, command); auto client = Client::create(id, move(client_socket), ptm_fd); - client->on_exit = [&clients, id] { clients.remove(id); }; + client->on_exit = [&clients, id] { + Core::deferred_invoke([&clients, id] { clients.remove(id); }); + }; clients.set(id, client); }; |