Commit 2db5bb31 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0a387dfc
...@@ -322,9 +322,9 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) { ...@@ -322,9 +322,9 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
if (err != nil) if (err != nil)
return make_pair(nil, E(err)); return make_pair(nil, E(err));
bool allok = false; bool retok = false;
defer([&]() { defer([&]() {
if (!allok) if (!retok)
f->_headf->close(); f->_headf->close();
}); });
...@@ -339,7 +339,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) { ...@@ -339,7 +339,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
wconn._filehtab[foid] = f; wconn._filehtab[foid] = f;
defer([&]() { defer([&]() {
if (!allok) if (!retok)
wconn._filehtab.erase(foid); wconn._filehtab.erase(foid);
}); });
...@@ -352,7 +352,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) { ...@@ -352,7 +352,7 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
return make_pair(nil, fmt::errorf("watch: %s", v(ack))); return make_pair(nil, fmt::errorf("watch: %s", v(ack)));
} }
allok = true; retok = true;
return make_pair(f, nil); return make_pair(f, nil);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment