Skip to content

Commit

Permalink
Fix error return on bad txn
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Jan 17, 2024
1 parent 6ea48c5 commit 5fa9777
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lmdb",
"author": "Kris Zyp",
"version": "2.9.3-beta.3-debug",
"version": "2.9.3-beta.4-debug",
"description": "Simple, efficient, scalable, high-performance LMDB interface",
"license": "MIT",
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions src/env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ MDB_txn* EnvWrap::getReadTxn(int64_t tw_address) {
if (rc) {
if (!txn)
fprintf(stderr, "No current read transaction available");
if (rc != EINVAL)
return nullptr; // if there was a real error, signal with nullptr and let error propagate with last_error
return nullptr; // if there was an error, signal with nullptr and let error propagate with last_error
}
return txn;
}
Expand Down

0 comments on commit 5fa9777

Please sign in to comment.