We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dea8505 commit dd2bce0Copy full SHA for dd2bce0
lib/src/connection_pool.dart
@@ -191,6 +191,9 @@ class SqliteConnectionPool with SqliteQueries implements SqliteConnection {
191
// Create a copy of the list, to avoid this triggering "Concurrent modification during iteration"
192
final toClose = _readConnections.sublist(0);
193
for (var connection in toClose) {
194
+ // Wait for connection initialization, so that any existing readLock()
195
+ // requests go through before closing.
196
+ await connection.ready;
197
await connection.close();
198
}
199
// Closing the write connection cleans up the journal files (-shm and -wal files).
0 commit comments