diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-27 01:12:48 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-04-27 01:12:48 +0100 |
commit | b51e33b78e047ce901205ade114ec839b6d8ed1b (patch) | |
tree | 041dea95c644cb237695a17bd48264bdc4e2f5e6 /netfs/fuse | |
parent | Fix race condition (diff) | |
download | netfs-b51e33b78e047ce901205ade114ec839b6d8ed1b.tar.bz2 netfs-b51e33b78e047ce901205ade114ec839b6d8ed1b.tar.xz netfs-b51e33b78e047ce901205ade114ec839b6d8ed1b.zip |
Handle async write errors
Actually get the potential except and throw something that won't cause retries. The retry occurs on the follow
up operation, which then success falsely.
Diffstat (limited to 'netfs/fuse')
-rw-r--r-- | netfs/fuse/fuseFiles.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp index 1c488ba..f08c1dd 100644 --- a/netfs/fuse/fuseFiles.cpp +++ b/netfs/fuse/fuseFiles.cpp @@ -132,8 +132,16 @@ namespace NetFS { } // Wait for them whilst unlocked lock.release()->unlock(); - for (const auto & r : overlap) { - r->future.wait(); + try { + for (const auto & r : overlap) { + r->future.get(); + } + } + catch (const SystemError &) { + throw; + } + catch (...) { + throw SystemError {ECOMM}; } // Cause this thread to yield so the callback can lock mutex usleep(0); |