From 2a9c370eed0b94f7773d2d4eca4887155b0835a6 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 7 Feb 2026 19:00:39 -0600 Subject: log when vpn client polling starts and stops --- src/slskd/Integrations/VPN/VPNService.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/slskd/Integrations/VPN/VPNService.cs b/src/slskd/Integrations/VPN/VPNService.cs index 4938e817..dbe7d2c1 100644 --- a/src/slskd/Integrations/VPN/VPNService.cs +++ b/src/slskd/Integrations/VPN/VPNService.cs @@ -78,8 +78,23 @@ public class VPNService : IDisposable private bool Disposed { get; set; } private SemaphoreSlim TimerElapsedLock { get; } = new SemaphoreSlim(1, 1); - public void StartPolling() => Timer?.Start(); - public void StopPolling() => Timer?.Stop(); + public void StartPolling() + { + if (Timer is not null && !Timer.Enabled) + { + Timer.Start(); + Log.Information("VPN client status polling enabled (interval: {Interval}ms)", Timer.Interval); + } + } + + public void StopPolling() + { + if (Timer is not null && Timer.Enabled) + { + Timer.Stop(); + Log.Information("VPN client status polling stopped"); + } + } public void Dispose() { -- cgit v1.2.3