aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-02-15 10:44:15 -0600
committerJP Dillingham <jp@dillingham.me>2026-02-15 10:44:15 -0600
commite3c5ecd5ff1ff3cb5f6a66ebb726e6d5058cd4cd (patch)
tree3149ca468be6970f0f9806a164083208d12c6b98 /src/slskd
parent79a17ea8d4cbe6b96e39818cb57053bce6fa08d7 (diff)
downloadslskd-e3c5ecd5ff1ff3cb5f6a66ebb726e6d5058cd4cd.tar.gz
make behavior of a null response from client more obvious
Diffstat (limited to 'src/slskd')
-rw-r--r--src/slskd/Integrations/VPN/VPNService.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/slskd/Integrations/VPN/VPNService.cs b/src/slskd/Integrations/VPN/VPNService.cs
index 95d897a3..1f59db99 100644
--- a/src/slskd/Integrations/VPN/VPNService.cs
+++ b/src/slskd/Integrations/VPN/VPNService.cs
@@ -170,8 +170,12 @@ public class VPNService : IDisposable
try
{
- status = await Client.GetStatusAsync()
- ?? throw new VPNClientException("VPN client returned an invalid response");
+ status = await Client.GetStatusAsync();
+
+ if (status is null)
+ {
+ throw new VPNClientException("VPN client returned an invalid response");
+ }
}
catch (Exception ex)
{