assert is not closed already

This commit is contained in:
Pere Diaz Bou
2025-07-08 15:58:11 +02:00
parent 5319af8fd8
commit ef41c19542

View File

@@ -742,6 +742,7 @@ impl Connection {
/// Close a connection and checkpoint.
pub fn close(&self) -> Result<()> {
turso_assert!(!self.closed.get(), "Connection already closed");
self.closed.set(true);
self.pager
.checkpoint_shutdown(self.wal_checkpoint_disabled.get())