aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2017-12-03 10:29:17 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2017-12-03 10:29:17 +0200
commit05c7e42a8ce55a21c94338febad593bfbf638655 (patch)
tree5465475f3565da1b724f4cd9bfcc0eb3b67fd167 /Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs
parent3a70d596ada24ad6f92f729d564ab29c3e249f06 (diff)
downloadTango-05c7e42a8ce55a21c94338febad593bfbf638655.tar.gz
Tango-05c7e42a8ce55a21c94338febad593bfbf638655.zip
MERGE
Diffstat (limited to 'Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs')
-rw-r--r--Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs b/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs
index 83a14b493..b3d259e8c 100644
--- a/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs
+++ b/Software/Visual_Studio/Tango.Synchronization/Local/SqliteDataBase.cs
@@ -8,6 +8,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Threading;
namespace Tango.Synchronization.Local
{
@@ -487,6 +488,24 @@ namespace Tango.Synchronization.Local
public void Dispose()
{
_connection.Close();
+ _connection.Dispose();
+ GC.Collect();
+
+ while (true)
+ {
+ try
+ {
+ using (FileStream stream = File.Open(Source, FileMode.Open, FileAccess.Read))
+ {
+ return;
+ }
+ }
+ catch (IOException)
+ {
+ GC.Collect();
+ Thread.Sleep(200);
+ }
+ }
}
}
}