Skip to content

Commit 859e475

Browse files
committed
fix: Fixed the bug introduced by #869, close #884
1 parent 0c20755 commit 859e475

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Ui/Service/SessionControlService_AlternateCredential.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ await Execute.OnUIThreadAsync(() =>
216216
// set the credential from the raw protocol (for reconnection since the credential may be changed when first connection)
217217
if (IoC.Get<GlobalData>().VmItemList.FirstOrDefault(x => x.Id == protocol.Id) is { Server: ProtocolBaseWithAddressPort swap })
218218
{
219-
protocol.DisplayName = swap.DisplayName;
220-
protocol.SetCredential(swap.GetCredential());
219+
var swap2 = (ProtocolBaseWithAddressPort)swap.Clone();
220+
swap2.DecryptToConnectLevel();
221+
protocol.DisplayName = swap2.DisplayName;
222+
protocol.SetCredential(swap2.GetCredential());
221223
}
222224

223225
var newCredential = protocol.GetCredential();

0 commit comments

Comments
 (0)