diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-02-15 10:44:15 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-02-15 10:44:15 -0600 |
| commit | e3c5ecd5ff1ff3cb5f6a66ebb726e6d5058cd4cd (patch) | |
| tree | 3149ca468be6970f0f9806a164083208d12c6b98 /src/slskd | |
| parent | 79a17ea8d4cbe6b96e39818cb57053bce6fa08d7 (diff) | |
| download | slskd-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.cs | 8 |
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) { |
