mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Fixed problem saving confCons.xml
Intoduced in commit 9a32aa3350
Removed "_saveUpdate" bool and related checks since it's not used
anywhere else. It was meaningless code (that caused a problem when
ReShaper "cleaned" it up).
This commit is contained in:
@@ -421,30 +421,25 @@ namespace mRemoteNG.App
|
||||
|
||||
public static void SaveConnectionsAsync()
|
||||
{
|
||||
_saveUpdate = true;
|
||||
var t = new Thread(SaveConnectionsBGd);
|
||||
t.SetApartmentState(ApartmentState.STA);
|
||||
t.Start();
|
||||
}
|
||||
|
||||
private static bool _saveUpdate;
|
||||
private static readonly object SaveLock = new object();
|
||||
private static void SaveConnectionsBGd()
|
||||
{
|
||||
Monitor.Enter(SaveLock);
|
||||
SaveConnections(_saveUpdate);
|
||||
SaveConnections();
|
||||
Monitor.Exit(SaveLock);
|
||||
}
|
||||
|
||||
public static void SaveConnections(bool update = false)
|
||||
public static void SaveConnections()
|
||||
{
|
||||
if (ConnectionTreeModel == null) return;
|
||||
|
||||
try
|
||||
{
|
||||
if (update && Settings.Default.UseSQLServer == false)
|
||||
return;
|
||||
|
||||
RemoteConnectionsSyncronizer?.Disable();
|
||||
|
||||
var connectionsSaver = new ConnectionsSaver();
|
||||
|
||||
Reference in New Issue
Block a user