Commit a1e3ec4c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 70803cff
......@@ -338,6 +338,10 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
return make_pair(nil, E(fmt::errorf("wcfs bug: head/file size %% blksize != 0")));
wconn._filehtab[foid] = f;
defer([&]() {
if (!allok)
wconn._filehtab.erase(foid);
});
// start watching f
string ack;
......@@ -345,7 +349,6 @@ pair<FileH, error> _Conn::open(zodb::Oid foid) {
if (err != nil)
return make_pair(nil, E(err));
if (ack != "ok") {
// XXX unregister f from _filehtab
return make_pair(nil, fmt::errorf("watch: %s", v(ack)));
}
......
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