From 38ddfa38f90593b8a2f9faa6cede6762d8282768 Mon Sep 17 00:00:00 2001 From: Adolfo Huitron Date: Sat, 22 Jun 2024 22:50:55 -0700 Subject: [PATCH] refactor: adjust test runner --- Tanji.CLI/Program.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Tanji.CLI/Program.cs b/Tanji.CLI/Program.cs index bd1bc85..b713687 100644 --- a/Tanji.CLI/Program.cs +++ b/Tanji.CLI/Program.cs @@ -63,17 +63,19 @@ static void CleanUp(PosixSignalContext context) public async Task RunAsync(CancellationToken cancellationToken = default) { + _webInterception.Start(); _logger.LogInformation("Intercepting Game Token(s)..."); do { string ticket = true ? "hhus.ABC.v4" : await _webInterception.InterceptTicketAsync(cancellationToken).ConfigureAwait(false); - _logger.LogInformation("Game Ticket: {ticket}", ticket); + _logger.LogInformation("Ticket Acquired: {ticket}", ticket); + _webInterception.Stop(); IGame game = await _clientHandler.PatchClientAsync(HPlatform.Flash).ConfigureAwait(false); - _logger.LogInformation("Client Patched : {game.path}", game.Path); - var context = new HConnectionContext(game); - _ = await _connectionHandler.LaunchAndInterceptConnectionAsync(ticket, context, cancellationToken).ConfigureAwait(false); + + HConnection connection = await _connectionHandler.LaunchAndInterceptConnectionAsync(ticket, context, cancellationToken); + await connection.AttachNodesAsync(cancellationToken).ConfigureAwait(false); } while (!cancellationToken.IsCancellationRequested); }