aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Integrations
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-02-07 19:00:39 -0600
committerJP Dillingham <jp@dillingham.me>2026-02-07 19:00:39 -0600
commit2a9c370eed0b94f7773d2d4eca4887155b0835a6 (patch)
treefc07c19f39216164e20e1bec4b82ab134e5d57e3 /src/slskd/Integrations
parent55376314db7972da453bbded6037f1e1db169a1f (diff)
downloadslskd-2a9c370eed0b94f7773d2d4eca4887155b0835a6.tar.gz
log when vpn client polling starts and stops
Diffstat (limited to 'src/slskd/Integrations')
-rw-r--r--src/slskd/Integrations/VPN/VPNService.cs19
1 files changed, 17 insertions, 2 deletions
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()
{