summaryrefslogtreecommitdiff
path: root/src/9p_io.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/9p_io.zig')
-rw-r--r--src/9p_io.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig
index 7b0976bc..02b9efb5 100644
--- a/src/9p_io.zig
+++ b/src/9p_io.zig
@@ -258,6 +258,10 @@ pub const Listener = struct {
// file written. A change carries no payload, so the reply is still
// whole after the wait.
l.kick();
+ // A refusal answers at once: its text may be in the core's one
+ // buffer for it, which a request run while this one waited would
+ // write over.
+ if (reply.status == .err) return conn.reply(&reply, "");
const restoring = core.restore_req != null;
if (core.effects_len != 0) pardes.turn.awaitSettled(epoch);
// Once a wait returns `core` may be gone: a Restore meanwhile put a