Skip to content

Commit

Permalink
Use protocol from app settings on reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindaugas Veblauskas committed Jul 29, 2024
1 parent c56b250 commit dcc068e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ProtonVPN.App/Core/Service/Vpn/VpnReconnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private async Task ExecuteReconnectionAsync(VpnReconnectionSteps reconnectionSte
switch (reconnectionStep)
{
case VpnReconnectionSteps.SimilarOnSameProtocol:
await ConnectToSimilarServerAsync(isToTryLastServer, _targetProfile?.VpnProtocol ?? _appSettings.GetProtocol());
await ConnectToSimilarServerAsync(isToTryLastServer, _appSettings.GetProtocol());
break;
case VpnReconnectionSteps.SimilarOnSmartProtocol:
await ConnectToSimilarServerAsync(isToTryLastServer, VpnProtocol.Smart);
Expand Down
4 changes: 2 additions & 2 deletions src/ProtonVPN.App/Settings/SettingsModalViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ public async Task OnVpnPlanChangedAsync(VpnPlanChangedEventArgs e)

private void SetDisconnected()
{
Disconnected = _vpnState.Status == VpnStatus.Disconnecting ||
_vpnState.Status == VpnStatus.Disconnected;
Disconnected = _vpnState is not null &&
_vpnState.Status is VpnStatus.Disconnecting or VpnStatus.Disconnected;
}

private void RefreshReconnectRequiredState(string settingChanged)
Expand Down

0 comments on commit dcc068e

Please sign in to comment.