From b51e33b78e047ce901205ade114ec839b6d8ed1b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 27 Apr 2022 01:12:48 +0100 Subject: 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. --- netfs/fuse/fuseFiles.cpp | 12 ++++++++++-- 1 file 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); -- cgit v1.2.3