[chronojump] Safer SQL open
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Safer SQL open
- Date: Wed, 11 Jan 2017 17:56:09 +0000 (UTC)
commit 137b49a40ac8bed053f5d3814272d86da52d839f
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jan 11 18:55:23 2017 +0100
Safer SQL open
src/sqlite/main.cs | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 18fb138..52cb816 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -145,7 +145,13 @@ class Sqlite
if(dbcon.State == System.Data.ConnectionState.Closed)
{
LogB.SQLon();
- dbcon.Open();
+ try {
+ dbcon.Open();
+ } catch {
+ LogB.SQL("-- catched on SQL open --");
+ System.Threading.Thread.Sleep(250);
+ Open();
+ }
} else
LogB.SQLonAlready();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]