fix(libmdbx): do not panic on timeout when closing cursor (#10838)

This commit is contained in:
Alexey Shekhirin
2024-09-11 13:35:10 +01:00
committed by GitHub
parent c498fa6349
commit 265e92685d

View File

@ -486,7 +486,8 @@ where
K: TransactionKind,
{
fn drop(&mut self) {
self.txn.txn_execute(|_| unsafe { ffi::mdbx_cursor_close(self.cursor) }).unwrap()
// Ignore the error, because we're dropping the cursor anyway.
let _ = self.txn.txn_execute(|_| unsafe { ffi::mdbx_cursor_close(self.cursor) });
}
}