on xenial help sign in
Add a one-second timeout to prevent deadlocks

I'm assuming that WindowStateStorage information is _really_ not that important with this, though one second is an eternity to be waiting on IO. The busy timeout will ensure that Lomiri only freezes for a read for 1 second if a slow write is occurring at the same time the read comes in.

commitcac838443358f47005c82edb7de57c7cd24a7587 authorDalton Durst <dalton@ubports.com> dateMon 18 Jan 2021, 11:25 (6 years ago) parentaf15c2a
1 file changed+1
plugins/Utils/windowstatestorage.cpp+1
plugins/Utils/windowstatestorage.cpp+1
@@ -56,6 +56,7 @@ public:
5656 {
5757 QSqlDatabase connection = QSqlDatabase::addDatabase(QStringLiteral("QSQLITE"), m_connectionName);
5858 connection.setDatabaseName(m_dbName);
59+ connection.setConnectOptions(QStringLiteral("QSQLITE_BUSY_TIMEOUT=1000"));
5960 if (!connection.open()) {
6061 qWarning() << "Error opening state database " << m_dbName << connection.lastError().driverText() << connection.lastError().databaseText();
6162 return false;