summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-05-02 12:59:23 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2022-05-02 12:59:23 +0100
commited15e569dc02c485f1d1373e26e6b760e1c5ac82 (patch)
tree54cfa50492631ff3fc8a83e838d9d67c17060d78
parentHandle case where zero size passes null to pread (diff)
downloadnetfs-ed15e569dc02c485f1d1373e26e6b760e1c5ac82.tar.bz2
netfs-ed15e569dc02c485f1d1373e26e6b760e1c5ac82.tar.xz
netfs-ed15e569dc02c485f1d1373e26e6b760e1c5ac82.zip
Always call get on future, as wait doesn't throw the stored exception
-rw-r--r--netfs/fuse/fuseFiles.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp
index d2aae51..55fdcf5 100644
--- a/netfs/fuse/fuseFiles.cpp
+++ b/netfs/fuse/fuseFiles.cpp
@@ -29,7 +29,7 @@ namespace NetFS {
return bg;
}();
for (const auto & w : cbg) {
- w.second->future.wait();
+ w.second->future.get();
}
}
@@ -41,8 +41,7 @@ namespace NetFS {
return bg.empty() ? nullptr : bg.begin()->second;
};
while (auto w = first()) {
- // background operations are void, so no need to actually get the return value
- w->future.wait();
+ w->future.get();
}
}