Initial commit
Build & Deploy / build (push) Failing after 43s

This commit is contained in:
2026-07-14 19:03:38 +02:00
commit 97807b25ee
43 changed files with 6913 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
using Microsoft.Extensions.Hosting;
namespace ReverseLlama.Client;
internal sealed class TunnelWorker : BackgroundService
{
private readonly TunnelClient _client;
private readonly IHostApplicationLifetime _lifetime;
public TunnelWorker(TunnelClient client, IHostApplicationLifetime lifetime)
{
_client = client;
_lifetime = lifetime;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
try
{
await _client.RunAsync(stoppingToken);
}
finally
{
// RunAsync only returns when cancelled or replaced by a newer client.
// Stop gracefully (exit 0) so service recovery does not restart us
// into a reconnect fight with the replacement.
_lifetime.StopApplication();
}
}
}