aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Integrations
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Integrations')
-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)
{