public void Exit() { if (wasExited) { return; } wasExited = true; if (this.activeSession != null) { this.activeSession.SessionEnd = DateTime.Now; this.activeSession.Commit(); } // lets wait a bit to make sure the commit has resolved. Thread.Sleep(100); try { dbSQLite.Close(); } catch (Exception) { GuiWidget.BreakInDebugger(); // we faild to close so lets wait a bit and try again Thread.Sleep(1000); try { dbSQLite.Close(); } catch (Exception) { GuiWidget.BreakInDebugger(); } } }
public void Exit() { if (this.activeSession != null) { this.activeSession.SessionEnd = DateTime.Now; this.activeSession.Commit(); } // lets wait a bit to make sure the commit has resolved. Thread.Sleep(100); try { dbSQLite.Close(); } catch (Exception) { // we faild to close so lets wait a bit and try again Thread.Sleep(1000); try { dbSQLite.Close(); } catch (Exception) { } } }