public async Task HandleNodeRequest(HttpContext context, WebSocket webSocket) { var connection = new SocketConnectionHandler(container, webSocket, serializer, factory); activeConnections.Add(connection); Console.WriteLine("Connection made"); await connection.ListenForCommands(); Console.WriteLine("Connection lost"); activeConnections.Remove(connection); }